diff options
author | JulienBe <jb379x@att.com> | 2020-04-10 16:50:08 +0200 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-05-04 15:08:43 +0200 |
commit | 26df3202534721dc7ed6e3c2b9c4a973502cc7cd (patch) | |
tree | efc43a6b4a46877c497b7ad9e4bc9ba62b12e2df /kubernetes/clamp/charts/mariadb/templates/deployment.yaml | |
parent | 006318ac37142eb823db4a2074ce6c8ad1629166 (diff) |
remove hardcoded MariaDB password
This aligns with other changes on OOM.
You can either supply a specific password or
have it generated for you based on a master password
Issue-ID: CLAMP-796, OJSI-188
Change-Id: If1b80fc47cf1033e094f8a106746d1e8c556c08b
Signed-off-by: JulienBe <jb379x@att.com>
Co-authored-by: sebdet <sebastien.determe@intl.att.com>
[small updates in common secret template usage]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'kubernetes/clamp/charts/mariadb/templates/deployment.yaml')
-rw-r--r-- | kubernetes/clamp/charts/mariadb/templates/deployment.yaml | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/kubernetes/clamp/charts/mariadb/templates/deployment.yaml b/kubernetes/clamp/charts/mariadb/templates/deployment.yaml index be46f89433..7d22930b6a 100644 --- a/kubernetes/clamp/charts/mariadb/templates/deployment.yaml +++ b/kubernetes/clamp/charts/mariadb/templates/deployment.yaml @@ -52,19 +52,19 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} env: - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "common.fullname" . }} - key: db-root-password + - name: MYSQL_USER + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }} + - name: MYSQL_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }} + - name: MYSQL_ROOT_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 12 }} + - name: MYSQL_DATABASE + value: {{ tpl .Values.db.databaseName .}} volumeMounts: - - mountPath: /docker-entrypoint-initdb.d/bootstrap-database.sh - name: docker-entrypoint-initdb - subPath: bootstrap-database.sh - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /docker-entrypoint-initdb.d/bulkload/ + - mountPath: /docker-entrypoint-initdb.d/ name: docker-entrypoint-bulkload - mountPath: /etc/mysql/conf.d/conf1/ name: clamp-mariadb-conf @@ -88,9 +88,6 @@ spec: {{- else }} emptyDir: {} {{- end }} - - name: docker-entrypoint-initdb - configMap: - name: clamp-entrypoint-initdb-configmap - name: docker-entrypoint-bulkload configMap: name: clamp-entrypoint-bulkload-configmap |