Pick up kube config file
This commit is contained in:
parent
2e8878c055
commit
3a0e31c35b
@ -48,7 +48,11 @@ class K8sDeployer(Deployer):
|
|||||||
self.cluster_info.int(compose_files, compose_env_file)
|
self.cluster_info.int(compose_files, compose_env_file)
|
||||||
|
|
||||||
def connect_api(self):
|
def connect_api(self):
|
||||||
|
if self.is_kind():
|
||||||
config.load_kube_config(context=f"kind-{self.kind_cluster_name}")
|
config.load_kube_config(context=f"kind-{self.kind_cluster_name}")
|
||||||
|
else:
|
||||||
|
# Get the config file and pass to load_kube_config()
|
||||||
|
config.load_kube_config(config_file=self.deployment_dir.joinpath(constants.kube_config_filename))
|
||||||
self.core_api = client.CoreV1Api()
|
self.core_api = client.CoreV1Api()
|
||||||
self.apps_api = client.AppsV1Api()
|
self.apps_api = client.AppsV1Api()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user