summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2021-06-13 13:46:22 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-06-14 08:56:35 +0000
commit4c10879ff2a74163ead8d7dcb49bea316b825cb0 (patch)
tree47eb2637d5122c5785959fb505505b923e5a03eb
parent48cf9a12dc601762e87e78dfd62865e819bbbb50 (diff)
Fix helm-healer.sh scriptguilin
Fix creating namespace during redeployment of helm 3 base ONAP Issue-ID: OOM-2768 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I7cb2d13bc51fbf8f2e0e90ec10eb347d9ea7e32c (cherry picked from commit 9463da9d40b54904ecc3d81d7392211b249b8fb3)
-rwxr-xr-xtools/helm-healer.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/helm-healer.sh b/tools/helm-healer.sh
index 47479a9b..ab79be8e 100755
--- a/tools/helm-healer.sh
+++ b/tools/helm-healer.sh
@@ -199,6 +199,18 @@ helm_undeploy()
sleep 15s
}
+helm_deploy()
+{
+ # Helm v3 need "--create-namespace" to create namespace if don't exist
+ if [[ $(helm version --template "{{.Version}}") =~ ^v3 ]];then
+ msg helm deploy ${RELEASE_PREFIX} local/onap --create-namespace --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
+ helm deploy ${RELEASE_PREFIX} local/onap --create-namespace --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
+ else
+ msg helm deploy ${RELEASE_PREFIX} local/onap --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
+ helm deploy ${RELEASE_PREFIX} local/onap --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
+ fi
+}
+
# arg: <job name>
delete_job()
{
@@ -691,8 +703,7 @@ fi
if [ -z "$HELM_SKIP_DEPLOY" ] ; then
# TODO: this is suboptimal - find a way how to deploy only the affected component...
msg "Redeploy onap..."
- msg helm deploy ${RELEASE_PREFIX} local/onap --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
- helm deploy ${RELEASE_PREFIX} local/onap --namespace ${NAMESPACE} ${OVERRIDES} --timeout ${HELM_TIMEOUT}
+ helm_deploy
else
msg "Clean only option used: Skipping redeploy..."
fi