Skip to content

Commit 38d7aac

Browse files
committed
refactor k8s.py
1 parent 84152f2 commit 38d7aac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/warnet/k8s.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
from kubernetes.client.models import CoreV1Event, V1PodList
88
from kubernetes.dynamic import DynamicClient
99

10+
from .constants import DEFAULT_NAMESPACE, KUBECONFIG
1011
from .process import run_command, stream_command
1112

12-
DEFAULT_NAMESPACE = "warnet"
13-
1413

1514
def get_static_client() -> CoreV1Event:
16-
config.load_kube_config()
15+
config.load_kube_config(config_file=KUBECONFIG)
1716
return client.CoreV1Api()
1817

1918

2019
def get_dynamic_client() -> DynamicClient:
21-
config.load_kube_config()
20+
config.load_kube_config(config_file=KUBECONFIG)
2221
return DynamicClient(client.ApiClient())
2322

2423

0 commit comments

Comments
 (0)