mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[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:
committed by
Kubernetes Prow Robot
parent
23ac4636c0
commit
ff6684e6c9
@@ -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:
|
||||
|
||||
@@ -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:")) }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user