This commit is contained in:
parent
2b2f838c20
commit
040f84328e
3
camera-operator.py
Normal file → Executable file
3
camera-operator.py
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
@ -70,7 +71,7 @@ async def main():
|
|||||||
if os.getenv("KUBECONFIG"):
|
if os.getenv("KUBECONFIG"):
|
||||||
await config.load_kube_config()
|
await config.load_kube_config()
|
||||||
else:
|
else:
|
||||||
await config.load_incluster_config()
|
config.load_incluster_config()
|
||||||
async with ApiClient() as api:
|
async with ApiClient() as api:
|
||||||
v1 = client.CoreV1Api(api)
|
v1 = client.CoreV1Api(api)
|
||||||
apps_api = client.AppsV1Api()
|
apps_api = client.AppsV1Api()
|
||||||
|
Reference in New Issue
Block a user