From 9020bcac1ec8771f9b8111243313747a531f8c30 Mon Sep 17 00:00:00 2001 From: wrider Date: Mon, 17 Jun 2019 15:16:21 -0400 Subject: [PATCH] Add namespace name to release name Credentials are per namespace therefore we need to deploy this chart for each namespace where the credential is needed. The helm release name used for deploying the chart to each namespace should reflect the namespace; otherwise we will have "release already exists" error when deploy the credential into the second namespace in the same cluster. Change-Id: I8fb013900113f3f16ecff40b8c32edfd32679a06 Signed-off-by: wrider --- ric-infra/20-Credential/bin/install | 4 ++-- ric-infra/20-Credential/bin/uninstall | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ric-infra/20-Credential/bin/install b/ric-infra/20-Credential/bin/install index a2619900..eb7bf21a 100755 --- a/ric-infra/20-Credential/bin/install +++ b/ric-infra/20-Credential/bin/install @@ -45,8 +45,8 @@ cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/ if [ -z $OVERRIDEYAML ]; then - helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../helm + helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm else - helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../helm + helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm fi diff --git a/ric-infra/20-Credential/bin/uninstall b/ric-infra/20-Credential/bin/uninstall index f93004a6..c820c7f7 100755 --- a/ric-infra/20-Credential/bin/uninstall +++ b/ric-infra/20-Credential/bin/uninstall @@ -36,5 +36,5 @@ else NAMESPACE=$RICPLT_NAMESPACE fi - helm delete --purge "${RELEASE_NAME}-credential" +helm delete --purge "${RELEASE_NAME}-${NAMESPACE}-credential" -- 2.16.6