Skip to content

Commit 5eb7870

Browse files
committed
k8s: add a 'get_all_tanks' command
1 parent 985218d commit 5eb7870

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/warnet/cli/k8s.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
import os
22
import subprocess
3-
43
from importlib.resources import files
54

65
from kubernetes import client, config
76
from kubernetes.dynamic import DynamicClient
87

9-
108
WAR_MANIFESTS = files("manifests")
119

10+
1211
def get_static_client():
1312
config.load_kube_config()
1413
return client.CoreV1Api()
1514

15+
1616
def get_dynamic_client():
1717
config.load_kube_config()
1818
return DynamicClient(client.ApiClient())
1919

20+
2021
def get_pods():
2122
sclient = get_static_client()
2223
return sclient.list_namespaced_pod("warnet")

0 commit comments

Comments
 (0)