From 57c39a0eb78be768f44784eb057c365da4203d60 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Sun, 21 Nov 2021 12:28:46 +0800 Subject: [PATCH] Add override to helm chart Signed-off-by: Bin Yang Change-Id: I912f51e3dc145830c9554a0e88719b330fc3e18f --- README-o2imsbuilder.md | 19 ++++++++++++++++++- charts/templates/deployment.yaml | 14 ++++++++++---- charts/values.yaml | 6 ++++++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/README-o2imsbuilder.md b/README-o2imsbuilder.md index e19b759..a2b4816 100644 --- a/README-o2imsbuilder.md +++ b/README-o2imsbuilder.md @@ -53,7 +53,24 @@ sudo docker tag o2imsdms:latest registry.local:9001/admin/o2imsdms:0.1.1 sudo docker image push registry.local:9001/admin/o2imsdms:0.1.1 cd /home/sysadmin/share/o2 -helm install o2imstest charts + +cat <ocloud-override.yaml +o2ims: + imagePullSecrets: admin-orano2-registry-secret + image: + repository: registry.local:9001/admin/o2imsdms + tag: 0.1.1 + pullPolicy: IfNotPresent + logginglevel: "DEBUG" + +ocloud: + OS_AUTH_URL: "your O-Cloud Auth endpoint, e.g. http://1.2.3.4:5000/v3" + OS_USERNAME: "Your auth Username" + OS_PASSWORD: "Your auth Password" +EOF + +helm install o2imstest charts/ -f ocloud-override.yaml + kubectl -n ${NAMESPACE} get pods diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 2e8ebf1..7748f3e 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -64,9 +64,9 @@ spec: - name: FLASK_APP value: /root/o2/o2ims/entrypoints/flask_application.py - name: FLASK_DEBUG - value: "1" + value: {{ .Values.o2ims.logginglevel }} - name: LOGGING_CONFIG_LEVEL - value: DEBUG + value: {{ .Values.o2ims.logginglevel }} - name: OS_AUTH_URL - name: OS_PASSWORD - name: OS_USERNAME @@ -93,10 +93,13 @@ spec: - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL - value: DEBUG + value: {{ .Values.o2ims.logginglevel }} - name: OS_AUTH_URL + value: {{ .Values.ocloud.OS_AUTH_URL }} - name: OS_PASSWORD + value: {{ .Values.ocloud.OS_PASSWORD }} - name: OS_USERNAME + value: {{ .Values.ocloud.OS_USERNAME }} - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST @@ -113,10 +116,13 @@ spec: - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL - value: DEBUG + value: {{ .Values.o2ims.logginglevel }} - name: OS_AUTH_URL + value: {{ .Values.ocloud.OS_AUTH_URL }} - name: OS_PASSWORD + value: {{ .Values.ocloud.OS_PASSWORD }} - name: OS_USERNAME + value: {{ .Values.ocloud.OS_USERNAME }} - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST diff --git a/charts/values.yaml b/charts/values.yaml index 2772908..1008681 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -35,3 +35,9 @@ o2ims: repository: registry.local:9001/admin/o2imsdms tag: 0.1.1 pullPolicy: IfNotPresent + logginglevel: "WARNING" + +ocloud: + OS_AUTH_URL: "" + OS_USERNAME: "" + OS_PASSWORD: "" -- 2.16.6