From 1d5c221862067b3b5b6e0555dcc4eb6c34e9a9f9 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Fri, 28 May 2021 16:24:24 +0200 Subject: [PATCH] Fix 1539: Helm v2.17.0 and set default value for stablerepourl 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 --- docker/LCM/Dockerfile | 7 +++++-- installers/charm/lcm/config.yaml | 4 ++++ installers/charm/lcm/src/charm.py | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/LCM/Dockerfile b/docker/LCM/Dockerfile index 8215fd94..81524a97 100644 --- a/docker/LCM/Dockerfile +++ b/docker/LCM/Dockerfile @@ -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 diff --git a/installers/charm/lcm/config.yaml b/installers/charm/lcm/config.yaml index f33d6067..78efe2f3 100644 --- a/installers/charm/lcm/config.yaml +++ b/installers/charm/lcm/config.yaml @@ -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 diff --git a/installers/charm/lcm/src/charm.py b/installers/charm/lcm/src/charm.py index 4e0b4bed..9b025c92 100755 --- a/installers/charm/lcm/src/charm.py +++ b/installers/charm/lcm/src/charm.py @@ -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: -- 2.25.1