Fix bug 1400: Change repo stable for helm2
Change-Id: Idc4c6454e539b0935d57b5b0cdcc0895b5d00895
Signed-off-by: lloretgalleg <illoret@indra.es>
diff --git a/n2vc/k8s_helm_base_conn.py b/n2vc/k8s_helm_base_conn.py
index 1aa95d2..af22ecc 100644
--- a/n2vc/k8s_helm_base_conn.py
+++ b/n2vc/k8s_helm_base_conn.py
@@ -43,6 +43,7 @@
####################################################################################
"""
service_account = "osm"
+ _STABLE_REPO_URL = "https://charts.helm.sh/stable"
def __init__(
self,
@@ -52,6 +53,7 @@
helm_command: str = "/usr/bin/helm",
log: object = None,
on_update_db=None,
+ vca_config: dict = None,
):
"""
@@ -82,6 +84,12 @@
self._helm_command = helm_command
self._check_file_exists(filename=helm_command, exception_if_not_exists=True)
+ # obtain stable repo url from config or apply default
+ if not vca_config or not vca_config.get("stablerepourl"):
+ self._stable_repo_url = self._STABLE_REPO_URL
+ else:
+ self._stable_repo_url = vca_config.get("stablerepourl")
+
@staticmethod
def _get_namespace_cluster_id(cluster_uuid: str) -> (str, str):
"""