Skip to content

Commit

Permalink
fix(app): ensure config is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonStuff committed Apr 8, 2024
1 parent aa34b28 commit acd512c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
try:
config.load_kube_config()
except:
config.load_incluster_config()
print("Could not load kube config. Trying to load in-cluster config.")
try:
config.load_incluster_config()
except:
print("Could not load in-cluster config. Exiting.")
exit(1)

v1 = client.CoreV1Api()

Expand Down

0 comments on commit acd512c

Please sign in to comment.