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: