Load Kubernetes incluster config instead
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Lauri Võsandi 2022-02-13 10:25:04 +02:00 committed by Lauri Võsandi
parent 7510dc8b6f
commit b378cfd75b

View File

@ -19,7 +19,7 @@ from sanic_prometheus import monitor
targets = [(j,j) for j in sys.argv[1:]]
if not targets:
# If no targets are specified, fall back to Kube API
config.load_kube_config()
config.load_incluster_config()
v1 = client.CoreV1Api()
for i in v1.list_namespaced_service("camtiler", label_selector="component=camdetect").items:
app.ctx.frames[i.metadata.name] = None