From 1d3396a248ab39d4e8e4c54b88766079e1d81155 Mon Sep 17 00:00:00 2001 From: Narek Matevosyan Date: Fri, 12 Jan 2024 16:18:21 +0400 Subject: [PATCH 1/3] add possibility to use secrets --- charts/odd-platform/templates/deployment.yaml | 16 ++++++++++------ charts/odd-platform/values.yaml | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/charts/odd-platform/templates/deployment.yaml b/charts/odd-platform/templates/deployment.yaml index 13e48fa..a29187d 100644 --- a/charts/odd-platform/templates/deployment.yaml +++ b/charts/odd-platform/templates/deployment.yaml @@ -45,15 +45,19 @@ spec: port: http resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if (.Values.config).env }} + {{- if or (.Values.config).env .Values.secret_keys }} env: + {{- if or (.Values.config).env }} {{- toYaml .Values.config.env | nindent 12 }} - {{- end }} - volumeMounts: - {{- if (.Values.config).yaml }} - - name: odd-platform-application-conf - mountPath: /app/config/ {{- end }} + {{- range .Values.secret_keys }} + - name: {{ .}} + valueFrom: + secretKeyRef: + name: demo-secret + key: {{ . }} + {{- end }} + {{- end }} volumes: {{- if (.Values.config).yaml }} - name: odd-platform-application-conf diff --git a/charts/odd-platform/values.yaml b/charts/odd-platform/values.yaml index 42069a5..2394172 100644 --- a/charts/odd-platform/values.yaml +++ b/charts/odd-platform/values.yaml @@ -37,6 +37,10 @@ securityContext: # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 + +#secret_keys: +# - SPRING_DATASOURCE_PASSWORD + config: # env: From 1a9a1ebf7cceaffda6ba61754f5bbd73a3a2d763 Mon Sep 17 00:00:00 2001 From: Narek Matevosyan Date: Tue, 16 Jan 2024 16:18:19 +0400 Subject: [PATCH 2/3] fix version --- charts/odd-platform/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/odd-platform/Chart.yaml b/charts/odd-platform/Chart.yaml index e4e4422..e4e145b 100644 --- a/charts/odd-platform/Chart.yaml +++ b/charts/odd-platform/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.8 +version: 0.1.9 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to From 5c073299b9d5a628e4ede7cc0b8ce90118bed363 Mon Sep 17 00:00:00 2001 From: Narek Matevosyan Date: Tue, 16 Jan 2024 23:10:17 +0400 Subject: [PATCH 3/3] fix chart version --- charts/odd-platform/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/odd-platform/Chart.yaml b/charts/odd-platform/Chart.yaml index e4e145b..e4e4422 100644 --- a/charts/odd-platform/Chart.yaml +++ b/charts/odd-platform/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.9 +version: 0.1.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to