Skip to content

Commit c8ee3b9

Browse files
committed
Added in cluster configuration support
1 parent cf0f990 commit c8ee3b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/codeflare_sdk/cluster/auth.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ def config_check() -> str:
162162
global config_path
163163
global api_client
164164
if config_path == None and api_client == None:
165-
config.load_kube_config()
165+
try:
166+
config.load_kube_config()
167+
except config.config_exception.ConfigException:
168+
try:
169+
config.load_incluster_config()
170+
except:
171+
print("Unable to load config file or in cluster configuration")
172+
166173
if config_path != None and api_client == None:
167174
return config_path
168175

0 commit comments

Comments
 (0)