mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
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.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "master.fullname" . }}
|
||||
name: {{ template "mariadb.fullname" . }}
|
||||
labels:
|
||||
app: "{{ template "mariadb.name" . }}"
|
||||
component: "master"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user