summaryrefslogtreecommitdiffstats
path: root/kubernetes/helm
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/helm')
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh19
-rw-r--r--kubernetes/helm/starters/onap-app/requirements.yaml3
-rw-r--r--kubernetes/helm/starters/onap-app/templates/deployment.yaml6
-rw-r--r--kubernetes/helm/starters/onap-app/values.yaml6
4 files changed, 21 insertions, 13 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index bb98a3b95e..40338b9485 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -98,7 +98,12 @@ deploy() {
FLAGS=${@:3}
CHART_REPO="$(cut -d'/' -f1 <<<"$CHART_URL")"
CHART_NAME="$(cut -d'/' -f2 <<<"$CHART_URL")"
- CACHE_DIR=~/.helm/plugins/deploy/cache
+ if [[ $HELM_VER == "v3."* ]]; then
+ CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
+ else
+ CACHE_DIR=~/.helm/plugins/deploy/cache
+ fi
+ echo "Use cache dir: $CACHE_DIR"
CHART_DIR=$CACHE_DIR/$CHART_NAME
CACHE_SUBCHART_DIR=$CHART_DIR-subcharts
LOG_DIR=$CHART_DIR/logs
@@ -114,7 +119,7 @@ deploy() {
if [[ $FLAGS = *"--delay"* ]]; then
FLAGS="$(echo $FLAGS| sed -n 's/--delay//p')"
DELAY="true"
- fi
+ fi
# determine if set-last-applied flag is enabled
SET_LAST_APPLIED="false"
if [[ $FLAGS = *"--set-last-applied"* ]]; then
@@ -246,12 +251,16 @@ deploy() {
if [[ $DELAY == "true" ]]; then
echo sleep 3m
sleep 3m
- fi
+ fi
else
array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
n=${#array[*]}
for (( i = n-1; i >= 0; i-- )); do
- helm del "${array[i]}" --purge
+ if [[ $HELM_VER == "v3."* ]]; then
+ helm del "${array[i]}"
+ else
+ helm del "${array[i]}" --purge
+ fi
done
fi
done
@@ -259,6 +268,8 @@ deploy() {
# report on success/failures of installs/upgrades
helm ls | grep FAILED | grep $RELEASE
}
+HELM_VER=$(helm version --template "{{.Version}}")
+echo $HELM_VER
case "${1:-"help"}" in
"help")
diff --git a/kubernetes/helm/starters/onap-app/requirements.yaml b/kubernetes/helm/starters/onap-app/requirements.yaml
index 6a61926e9e..b8e59b0910 100644
--- a/kubernetes/helm/starters/onap-app/requirements.yaml
+++ b/kubernetes/helm/starters/onap-app/requirements.yaml
@@ -15,4 +15,7 @@
dependencies:
- name: common
version: ~6.x-0
+ repository: '@local'
+ - name: repositoryGenerator
+ version: ~6.x-0
repository: '@local' \ No newline at end of file
diff --git a/kubernetes/helm/starters/onap-app/templates/deployment.yaml b/kubernetes/helm/starters/onap-app/templates/deployment.yaml
index c3979dc272..fc76c1ff6d 100644
--- a/kubernetes/helm/starters/onap-app/templates/deployment.yaml
+++ b/kubernetes/helm/starters/onap-app/templates/deployment.yaml
@@ -33,7 +33,7 @@ spec:
initContainers:
#Example init container for dependency checking
# - command:
-# - /root/ready.py
+# - /app/ready.py
# args:
# - --container-name
# - mariadb
@@ -43,12 +43,12 @@ spec:
# fieldRef:
# apiVersion: v1
# fieldPath: metadata.namespace
-# image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+# image: {{ include "repositoryGenerator.image.readiness" . }}
# imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
# name: {{ include "common.name" . }}-readiness
containers:
- name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
diff --git a/kubernetes/helm/starters/onap-app/values.yaml b/kubernetes/helm/starters/onap-app/values.yaml
index 6c119b9bcd..702bfb2a73 100644
--- a/kubernetes/helm/starters/onap-app/values.yaml
+++ b/kubernetes/helm/starters/onap-app/values.yaml
@@ -17,17 +17,11 @@
#################################################################
global:
nodePortPrefix: 302
- repository: nexus3.onap.org:10001
- readinessRepository: oomk8s
- readinessImage: readiness-check:2.0.0
- loggingRepository: docker.elastic.co
- loggingImage: beats/filebeat:5.5.0
#################################################################
# Application configuration defaults.
#################################################################
# application image
-repository: nexus3.onap.org:10001
image: <onap-app>:<1.2-STAGING-latest>
pullPolicy: Always