Update helm repo after adding the repo
Change-Id: I4cd2a073cb862fac4d7646e65f7b3df6068a1c5a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/n2vc/k8s_helm_base_conn.py b/n2vc/k8s_helm_base_conn.py
index f3dd315..8c52a7b 100644
--- a/n2vc/k8s_helm_base_conn.py
+++ b/n2vc/k8s_helm_base_conn.py
@@ -168,15 +168,6 @@
# sync local dir
self.fs.sync(from_path=cluster_uuid)
- # helm repo update
- command = "env KUBECONFIG={} {} repo update".format(
- paths["kube_config"], self._helm_command
- )
- self.log.debug("updating repo: {}".format(command))
- await self._local_async_exec(
- command=command, raise_exception_on_error=False, env=env
- )
-
# helm repo add name url
command = "env KUBECONFIG={} {} repo add {} {}".format(
paths["kube_config"], self._helm_command, name, url
@@ -186,6 +177,15 @@
command=command, raise_exception_on_error=True, env=env
)
+ # helm repo update
+ command = "env KUBECONFIG={} {} repo update".format(
+ paths["kube_config"], self._helm_command
+ )
+ self.log.debug("updating repo: {}".format(command))
+ await self._local_async_exec(
+ command=command, raise_exception_on_error=False, env=env
+ )
+
# sync fs
self.fs.reverse_sync(from_path=cluster_uuid)