[stable/mariadb] Fix the command generated to retrieve the administrator password in NOTES.txt (#17954)

Signed-off-by: Nicolas Camus <nicolas@octopulse.io>
This commit is contained in:
Nicolas Camus
2019-10-15 02:47:51 -07:00
committed by Kubernetes Prow Robot
parent 23ac4636c0
commit ff6684e6c9
6 changed files with 22 additions and 43 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: mariadb
version: 6.11.1
version: 6.11.2
appVersion: 10.3.18
description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
keywords:
+2 -2
View File
@@ -15,7 +15,7 @@ Services:
Administrator credentials:
Username: root
Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
To connect to your database:
@@ -38,7 +38,7 @@ To upgrade this helm chart:
1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below:
ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
helm upgrade {{ .Release.Name }} stable/mariadb --set rootUser.password=$ROOT_PASSWORD
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
+11
View File
@@ -242,3 +242,14 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Return the name of the Secret used to store the passwords
*/}}
{{- define "mariadb.secretName" -}}
{{- if .Values.existingSecret -}}
{{ .Values.existingSecret }}
{{- else -}}
{{ template "mariadb.fullname" . -}}
{{- end -}}
{{- end -}}
@@ -117,11 +117,7 @@ spec:
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-root-password
{{- if .Values.db.user }}
- name: MARIADB_USER
@@ -129,11 +125,7 @@ spec:
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-password
{{- end }}
- name: MARIADB_DATABASE
@@ -146,11 +138,7 @@ spec:
- name: MARIADB_REPLICATION_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-replication-password
{{- end }}
ports:
@@ -201,11 +189,7 @@ spec:
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-root-password
command:
- sh
@@ -126,22 +126,14 @@ spec:
- name: MARIADB_MASTER_ROOT_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-root-password
- name: MARIADB_REPLICATION_USER
value: "{{ .Values.replication.user }}"
- name: MARIADB_REPLICATION_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-replication-password
ports:
- name: mysql
@@ -184,11 +176,7 @@ spec:
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-root-password
command:
- sh
+1 -5
View File
@@ -27,11 +27,7 @@ spec:
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: {{ .Values.existingSecret }}
{{- else }}
name: {{ template "mariadb.fullname" . }}
{{- end }}
name: {{ template "mariadb.secretName" . }}
key: mariadb-root-password
volumeMounts:
- mountPath: /tests