Fix 1539: Helm v2.17.0 and set default value for stablerepourl 15/10915/2
authorDavid Garcia <david.garcia@canonical.com>
Fri, 28 May 2021 14:24:24 +0000 (16:24 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Fri, 28 May 2021 14:36:52 +0000 (16:36 +0200)
The --skip-repo option was not available. The version v2.17.0 is the
latest v2 version available.

Set https://charts.helm.sh/stable as the default stablerepourl value.

Change-Id: Ifdd85f0f891a705f56cdd50c6e4dbf95820d706f
Signed-off-by: David Garcia <david.garcia@canonical.com>
docker/LCM/Dockerfile
installers/charm/lcm/config.yaml
installers/charm/lcm/src/charm.py

index 8215fd9..81524a9 100644 (file)
@@ -36,8 +36,8 @@ RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add
     && echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
     && apt-get update && apt-get install -y kubectl=1.20.4-00
 
-RUN curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz --output helm-v2.15.2.tar.gz \
-    && tar -zxvf helm-v2.15.2.tar.gz \
+RUN curl https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz --output helm-v2.17.0.tar.gz \
+    && tar -zxvf helm-v2.17.0.tar.gz \
     && mv linux-amd64/helm /usr/local/bin/helm \
     && rm -r linux-amd64/
 
@@ -127,6 +127,9 @@ ENV OSMLCM_VCA_HELMPATH    /usr/local/bin/helm
 ENV OSMLCM_VCA_KUBECTLPATH /usr/bin/kubectl
 ENV OSMLCM_VCA_JUJUPATH    /usr/local/bin/juju
 
+# helm
+ENV OSMLCM_VCA_STABLEREPOURL https://charts.helm.sh/stable
+
 # logs
 # ENV OSMLCM_GLOBAL_LOGFILE  /app/log/lcm.log
 # ENV OSMLCM_GLOBAL_LOGLEVEL DEBUG
index f33d606..78efe2f 100644 (file)
@@ -266,3 +266,7 @@ options:
       during controller and model creation
       (bootstrap --config and add-model --config).
     type: string
+  vca_stablerepourl:
+    description: Stable repository URL for Helm charts
+    type: string
+    default: https://charts.helm.sh/stable
index 4e0b4be..9b025c9 100755 (executable)
@@ -108,6 +108,7 @@ class ConfigModel(ModelValidator):
     vca_model_config_test_mode: Optional[bool]
     vca_model_config_transmit_vendor_metrics: Optional[bool]
     vca_model_config_update_status_hook_interval: Optional[str]
+    vca_stablerepourl: Optional[str]
 
     @validator("log_level")
     def validate_log_level(cls, v):
@@ -191,6 +192,7 @@ class LcmCharm(CharmedOsmBase):
                 "OSMLCM_STORAGE_COLLECTION": "files",
                 "OSMLCM_STORAGE_URI": config.mongodb_uri
                 or self.mongodb_client.connection_string,
+                "OSMLCM_VCA_STABLEREPOURL": config.vca_stablerepourl,
             }
         )
         if config.vca_host: