summaryrefslogtreecommitdiffstats
path: root/kubernetes/helm
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2021-10-12 14:10:49 +0100
committerefiacor <fiachra.corcoran@est.tech>2021-12-07 12:36:35 +0000
commit370c6dc33e55bfee7b3b79bcc21481b02a3f1e24 (patch)
treef687912dcc35388a56a4fdacd9bddc81c667ff95 /kubernetes/helm
parent71a47c57fa84a36bb12bf3b87ad0d18b142c8d37 (diff)
[GLOBAL] Migrate to helm v3
Move all Chart.yaml to use apiVersion: 2 Move dependencies from requirements.yaml to Chart.yaml Changes to all makeFiles Changes to helm deploy plugin Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I03c5290eee9e40f76eacbf171e774204cf5fb1c0 Issue-ID: OOM-2845
Diffstat (limited to 'kubernetes/helm')
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh27
-rw-r--r--kubernetes/helm/starters/onap-app/Chart.yaml13
-rw-r--r--kubernetes/helm/starters/onap-app/requirements.yaml22
3 files changed, 20 insertions, 42 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index 5820e77521..13b0ed86e2 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -99,11 +99,8 @@ deploy() {
FLAGS=$(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//')
CHART_REPO="$(echo "$CHART_URL" | cut -d'/' -f1)"
CHART_NAME="$(echo "$CHART_URL" | cut -d'/' -f2)"
- if expr "$HELM_VER" : "v3\..*" ; then
- CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
- else
- CACHE_DIR=~/.helm/plugins/deploy/cache
- fi
+
+ CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
echo "Use cache dir: $CACHE_DIR"
CHART_DIR=$CACHE_DIR/$CHART_NAME
CACHE_SUBCHART_DIR=$CHART_DIR-subcharts
@@ -181,9 +178,11 @@ deploy() {
# temp hack - parent chart needs common subchart
mv $CACHE_SUBCHART_DIR/common $CHART_DIR/charts/
- # disable dependencies
- rm $CHART_DIR/requirements.lock
- mv $CHART_DIR/requirements.yaml $CHART_DIR/requirements.deploy
+ # disable dependencies
+ rm $CHART_DIR/Chart.lock
+ sed -n '1,/dependencies:/p;/description:/,$p' $CHART_DIR/Chart.yaml | grep -v dependencies > $CHART_DIR/deploy_Chart.yaml
+ mv $CHART_DIR/Chart.yaml $CHART_DIR/Chart.deploy
+ mv $CHART_DIR/deploy_Chart.yaml $CHART_DIR/Chart.yaml
# compute overrides for parent and all subcharts
COMPUTED_OVERRIDES=$CACHE_DIR/$CHART_NAME/computed-overrides.yaml
@@ -257,21 +256,13 @@ deploy() {
array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
n=${#array[*]}
for i in $(seq $(($n-1)) -1 0); do
- if expr "$HELM_VER" : "v3\..*" ; then
- helm del "${array[i]}"
- else
- helm del "${array[i]}" --purge
- fi
+ helm del "${array[i]}"
done
fi
done
# report on success/failures of installs/upgrades
- if expr "$HELM_VER" : "v3\..*" ; then
- helm ls --all-namespaces | grep -i FAILED | grep $RELEASE
- else
- helm ls | grep FAILED | grep $RELEASE
- fi
+ helm ls --all-namespaces | grep -i FAILED | grep $RELEASE
}
HELM_VER=$(helm version --template "{{.Version}}")
echo $HELM_VER
diff --git a/kubernetes/helm/starters/onap-app/Chart.yaml b/kubernetes/helm/starters/onap-app/Chart.yaml
index 87a62ed77b..6782264007 100644
--- a/kubernetes/helm/starters/onap-app/Chart.yaml
+++ b/kubernetes/helm/starters/onap-app/Chart.yaml
@@ -1,5 +1,6 @@
# Copyright © 2017 Amdocs, Bell Canada
# Modifications Copyright © 2021 Orange
+# Modifications Copyright © 2021 Nordix Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,7 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
+apiVersion: v2
description: <Short application description - this is visible via 'helm search'>
name: <onap-app>
-version: 9.0.0
+version: 10.0.0
+
+dependencies:
+ - name: common
+ version: ~10.x-0
+ repository: '@local'
+ - name: repositoryGenerator
+ version: ~10.x-0
+ repository: '@local'
diff --git a/kubernetes/helm/starters/onap-app/requirements.yaml b/kubernetes/helm/starters/onap-app/requirements.yaml
deleted file mode 100644
index 4fecc22f0c..0000000000
--- a/kubernetes/helm/starters/onap-app/requirements.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2021 Orange
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-dependencies:
- - name: common
- version: ~9.x-0
- repository: '@local'
- - name: repositoryGenerator
- version: ~9.x-0
- repository: '@local'