Skip to content

Commit c97d268

Browse files
authored
Update api_client.py
1 parent 8de6e1c commit c97d268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def api_init(kube_config_file=None, host=None, token_filename=None, cert_filenam
6969
else:
7070
configuration = Configuration()
7171
api_client = ApiClient()
72-
if running_in_container():
7372
kubeconfig_path = os.getenv('KUBISCAN_CONFIG_PATH')
73+
if running_in_container() and kubeconfig_path is None:
7474
# TODO: Consider using config.load_incluster_config() from container created by Kubernetes. Required service account with privileged permissions.
7575
# Must have mounted volume
7676
container_volume_prefix = os.getenv('KUBISCAN_VOLUME_PATH', '/tmp')

0 commit comments

Comments
 (0)