finish the main code

This commit is contained in:
Rainy21
2026-04-28 13:11:31 -04:00
commit 71a9858ddd
14 changed files with 234 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import os
import kubernetes import client, config
def get_core_client() -> client.CoreV1Api:
if os.getenv("IN_CLUSTER"):
config.load_incluster_config()
else:
config.load_kube_config( # runs locally
config_file=os.getenv("KUBECONFIG", "~/.kube/config")
)
return client.CoreV1Api()
def get_custom_client() -> client.CustomObjectsApi:
return client.CustomObjectsApi()