From acd512ce382e48185769be2a7aaa741d533eaa0d Mon Sep 17 00:00:00 2001 From: "Alexander 4584443+DragonStuff@users.noreply.github.com" <4584443+DragonStuff@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:40:48 +0900 Subject: [PATCH] fix(app): ensure config is loaded --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 651a909..2eac5d3 100644 --- a/app.py +++ b/app.py @@ -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()