X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fk8s_helm_conn.py;h=ad230b5f36a7ee859dd8d7e8c77c41664766fd2b;hp=442ed06b93ef7896f61492d504887d8b531e86c8;hb=refs%2Fchanges%2F99%2F10499%2F1;hpb=137dc9e1040534b64b19f4b556ced242e798356b diff --git a/n2vc/k8s_helm_conn.py b/n2vc/k8s_helm_conn.py index 442ed06..ad230b5 100644 --- a/n2vc/k8s_helm_conn.py +++ b/n2vc/k8s_helm_conn.py @@ -72,7 +72,8 @@ class K8sHelmConnector(K8sHelmBaseConnector): # initialize helm client-only self.log.debug("Initializing helm client-only...") - command = "{} init --client-only".format(self._helm_command) + command = "{} init --client-only --stable-repo-url {} ".format( + self._helm_command, self._stable_repo_url) try: asyncio.ensure_future( self._local_async_exec(command=command, raise_exception_on_error=False) @@ -91,6 +92,7 @@ class K8sHelmConnector(K8sHelmBaseConnector): self, cluster_uuid: str, kdu_model: str, + kdu_instance: str, atomic: bool = True, timeout: float = 300, params: dict = None, @@ -109,22 +111,25 @@ class K8sHelmConnector(K8sHelmBaseConnector): cluster_name=cluster_id, create_if_not_exist=True ) - kdu_instance = await self._install_impl(cluster_id, - kdu_model, - paths, - env, - atomic=atomic, - timeout=timeout, - params=params, - db_dict=db_dict, - kdu_name=kdu_name, - namespace=namespace) + await self._install_impl( + cluster_id, + kdu_model, + paths, + env, + kdu_instance, + atomic=atomic, + timeout=timeout, + params=params, + db_dict=db_dict, + kdu_name=kdu_name, + namespace=namespace, + ) # sync fs self.fs.reverse_sync(from_path=cluster_id) self.log.debug("Returning kdu_instance {}".format(kdu_instance)) - return kdu_instance + return True async def inspect_kdu(self, kdu_model: str, repo_url: str = None) -> str: @@ -285,12 +290,13 @@ class K8sHelmConnector(K8sHelmBaseConnector): self.log.info("Initializing helm in client: {}".format(cluster_id)) command = ( "{} --kubeconfig={} --tiller-namespace={} " - "--home={} init --client-only" + "--home={} init --client-only --stable-repo-url {} " ).format( self._helm_command, paths["kube_config"], namespace, paths["helm_dir"], + self._stable_repo_url, ) output, _rc = await self._local_async_exec( command=command, raise_exception_on_error=True, env=env