From e75cb690bea567153579694c0248bb94cb6f0fb2 Mon Sep 17 00:00:00 2001 From: Beltran Date: Mon, 28 May 2018 09:56:31 +0200 Subject: [PATCH] MariaDB standard service name (#5765) * Do not use 'master' in release name when replication is not enabled * Do not use 'master' in release name when replication is not enabled * Use the same version in the Chart.yaml and in the values.yaml. Most of the web apps are compatible with 10.1 right now * Update minor version * Use the same name for the service,that way apps can use replication or not without any change. * Use the same name for the service,that way apps can use replication or not without any change. --- stable/mariadb/Chart.yaml | 2 +- stable/mariadb/templates/NOTES.txt | 4 ++-- stable/mariadb/templates/master-svc.yaml | 2 +- stable/mariadb/templates/slave-statefulset.yaml | 2 +- stable/mariadb/templates/tests.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index a25712fed8..0c7d6603ea 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 4.1.2 +version: 4.2.0 appVersion: 10.1.33 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: diff --git a/stable/mariadb/templates/NOTES.txt b/stable/mariadb/templates/NOTES.txt index 1718a99449..4ba3b668ad 100644 --- a/stable/mariadb/templates/NOTES.txt +++ b/stable/mariadb/templates/NOTES.txt @@ -7,7 +7,7 @@ Tip: Services: - echo Master: {{ template "master.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} {{- if .Values.replication.enabled }} echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} {{- end }} @@ -25,7 +25,7 @@ To connect to your database 2. To connect to master service (read/write): - mysql -h {{ template "master.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} {{- if .Values.replication.enabled }} diff --git a/stable/mariadb/templates/master-svc.yaml b/stable/mariadb/templates/master-svc.yaml index 110eab01a5..460ec328ed 100644 --- a/stable/mariadb/templates/master-svc.yaml +++ b/stable/mariadb/templates/master-svc.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "master.fullname" . }} + name: {{ template "mariadb.fullname" . }} labels: app: "{{ template "mariadb.name" . }}" component: "master" diff --git a/stable/mariadb/templates/slave-statefulset.yaml b/stable/mariadb/templates/slave-statefulset.yaml index 291816e9aa..8a06323faf 100644 --- a/stable/mariadb/templates/slave-statefulset.yaml +++ b/stable/mariadb/templates/slave-statefulset.yaml @@ -75,7 +75,7 @@ spec: - name: MARIADB_REPLICATION_MODE value: "slave" - name: MARIADB_MASTER_HOST - value: {{ template "master.fullname" . }} + value: {{ template "mariadb.fullname" . }} - name: MARIADB_MASTER_PORT value: "3306" - name: MARIADB_MASTER_USER diff --git a/stable/mariadb/templates/tests.yaml b/stable/mariadb/templates/tests.yaml index b7eefc0c71..957f3fd1e0 100644 --- a/stable/mariadb/templates/tests.yaml +++ b/stable/mariadb/templates/tests.yaml @@ -5,5 +5,5 @@ metadata: data: run.sh: |- @test "Testing MariaDB is accessible" { - mysql -h {{ template "master.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' }