diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index 29146c2682ce..26b3cd4bdbd8 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 1.0.7 +version: 2.0.0 appVersion: 10.1.28 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. keywords: diff --git a/stable/mariadb/templates/NOTES.txt b/stable/mariadb/templates/NOTES.txt index 4469c0524257..663e856869d2 100644 --- a/stable/mariadb/templates/NOTES.txt +++ b/stable/mariadb/templates/NOTES.txt @@ -1,15 +1,15 @@ MariaDB can be accessed via port 3306 on the following DNS name from within your cluster: -{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local +{{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local {{ if .Values.usePassword -}} To get the root password run: - MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) {{ if .Values.mariadbUser -}} To get the password for "{{ .Values.mariadbUser }}" run: - MARIADB_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.mariadb-password}" | base64 --decode) + MARIADB_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-password}" | base64 --decode) {{- end }} {{- end -}} @@ -17,7 +17,7 @@ To connect to your database: 1. Run a pod that you can use as a client: - kubectl run {{ template "fullname" . }}-client --rm --tty -i {{ if .Values.usePassword }}--env MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD{{ end }} --image bitnami/mariadb --command -- bash + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i {{ if .Values.usePassword }}--env MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD{{ end }} --image bitnami/mariadb --command -- bash 2. Connect using the mysql cli, then provide your password: - mysql -h {{ template "fullname" . }} {{- if .Values.usePassword }} -p$MARIADB_ROOT_PASSWORD{{ end }} + mysql -h {{ template "mariadb.fullname" . }} {{- if .Values.usePassword }} -p$MARIADB_ROOT_PASSWORD{{ end }} diff --git a/stable/mariadb/templates/_helpers.tpl b/stable/mariadb/templates/_helpers.tpl index f0d83d2edba6..8c6aee754b49 100644 --- a/stable/mariadb/templates/_helpers.tpl +++ b/stable/mariadb/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "mariadb.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -10,7 +10,7 @@ Expand the name of the chart. Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} -{{- define "fullname" -}} +{{- define "mariadb.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/stable/mariadb/templates/configmap.yaml b/stable/mariadb/templates/configmap.yaml index 5dd9bf5fc4cf..149394478ca3 100644 --- a/stable/mariadb/templates/configmap.yaml +++ b/stable/mariadb/templates/configmap.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/deployment.yaml b/stable/mariadb/templates/deployment.yaml index 1535d348c571..d90af4e95736 100644 --- a/stable/mariadb/templates/deployment.yaml +++ b/stable/mariadb/templates/deployment.yaml @@ -1,9 +1,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -11,7 +11,7 @@ spec: template: metadata: labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} spec: containers: - name: mariadb @@ -22,13 +22,13 @@ spec: - name: MARIADB_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} key: mariadb-root-password {{- if .Values.mariadbUser }} - name: MARIADB_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} key: mariadb-password {{- end }} {{- else }} @@ -73,7 +73,7 @@ spec: - name: MARIADB_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} key: mariadb-root-password {{- end }} command: [ 'sh', '-c', 'DATA_SOURCE_NAME="root:$MARIADB_ROOT_PASSWORD@(localhost:3306)/" /bin/mysqld_exporter' ] @@ -98,11 +98,11 @@ spec: volumes: - name: config configMap: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }} + claimName: {{ .Values.persistence.existingClaim | default (include "mariadb.fullname" .) }} {{- else }} emptyDir: {} {{- end -}} diff --git a/stable/mariadb/templates/pvc.yaml b/stable/mariadb/templates/pvc.yaml index 439abccbaf74..4fbd6e1bc19e 100644 --- a/stable/mariadb/templates/pvc.yaml +++ b/stable/mariadb/templates/pvc.yaml @@ -2,9 +2,9 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/secrets.yaml b/stable/mariadb/templates/secrets.yaml index ee113d706601..266cb6ece8ea 100644 --- a/stable/mariadb/templates/secrets.yaml +++ b/stable/mariadb/templates/secrets.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/svc.yaml b/stable/mariadb/templates/svc.yaml index 3256b2a747a3..13d108f91b0a 100644 --- a/stable/mariadb/templates/svc.yaml +++ b/stable/mariadb/templates/svc.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -23,4 +23,4 @@ spec: targetPort: metrics {{- end }} selector: - app: {{ template "fullname" . }} + app: {{ template "mariadb.fullname" . }} diff --git a/stable/mariadb/templates/test-runner.yaml b/stable/mariadb/templates/test-runner.yaml index 896eb807d4b9..fb91dc2a1fb2 100644 --- a/stable/mariadb/templates/test-runner.yaml +++ b/stable/mariadb/templates/test-runner.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ template "fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" annotations: "helm.sh/hook": test-success spec: @@ -27,7 +27,7 @@ spec: - name: MARIADB_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "mariadb.fullname" . }} key: mariadb-root-password {{- end }} volumeMounts: @@ -39,7 +39,7 @@ spec: volumes: - name: tests configMap: - name: {{ template "fullname" . }}-tests + name: {{ template "mariadb.fullname" . }}-tests - name: tools emptyDir: {} restartPolicy: Never diff --git a/stable/mariadb/templates/tests.yaml b/stable/mariadb/templates/tests.yaml index c4d784744391..9b029f46afe8 100644 --- a/stable/mariadb/templates/tests.yaml +++ b/stable/mariadb/templates/tests.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "fullname" . }}-tests + name: {{ template "mariadb.fullname" . }}-tests data: run.sh: |- @test "Testing MariaDB is accessible" { - mysql -h {{ template "fullname" . }} {{- if .Values.usePassword }} -p$MARIADB_ROOT_PASSWORD{{ end }} -e 'show databases;' + mysql -h {{ template "mariadb.fullname" . }} {{- if .Values.usePassword }} -p$MARIADB_ROOT_PASSWORD{{ end }} -e 'show databases;' }