diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index 660b2bf9c7..9eb1856a1b 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 4.3.2 +version: 4.3.3 appVersion: 10.1.35 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/master-svc.yaml b/stable/mariadb/templates/master-svc.yaml index 460ec328ed..8fd07fd973 100644 --- a/stable/mariadb/templates/master-svc.yaml +++ b/stable/mariadb/templates/master-svc.yaml @@ -18,6 +18,13 @@ spec: - name: mysql port: {{ .Values.service.port }} targetPort: mysql +{{- if eq .Values.service.type "NodePort" }} +{{- if .Values.service.nodePort }} +{{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} +{{- end }} +{{- end }} +{{- end }} {{- if .Values.metrics.enabled }} - name: metrics port: 9104 diff --git a/stable/mariadb/templates/slave-svc.yaml b/stable/mariadb/templates/slave-svc.yaml index fa551371f8..54bc8f3dc1 100644 --- a/stable/mariadb/templates/slave-svc.yaml +++ b/stable/mariadb/templates/slave-svc.yaml @@ -19,6 +19,13 @@ spec: - name: mysql port: {{ .Values.service.port }} targetPort: mysql +{{- if (eq .Values.service.type "NodePort") }} +{{- if .Values.service.nodePort }} +{{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} +{{- end }} +{{- end }} +{{- end }} {{- if .Values.metrics.enabled }} - name: metrics port: 9104 @@ -28,4 +35,4 @@ spec: app: "{{ template "mariadb.name" . }}" component: "slave" release: "{{ .Release.Name }}" -{{- end }} \ No newline at end of file +{{- end }} diff --git a/stable/mariadb/values-production.yaml b/stable/mariadb/values-production.yaml index 97d6e77c5a..b680cb9a1b 100644 --- a/stable/mariadb/values-production.yaml +++ b/stable/mariadb/values-production.yaml @@ -18,9 +18,15 @@ image: # - myRegistrKeySecretName service: - ## Kubernetes service type + ## Kubernetes service type, ClusterIP and NodePort are supported at present type: ClusterIP port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 rootUser: ## MariaDB admin password diff --git a/stable/mariadb/values.yaml b/stable/mariadb/values.yaml index d336d81ab5..604209c4ea 100644 --- a/stable/mariadb/values.yaml +++ b/stable/mariadb/values.yaml @@ -18,9 +18,15 @@ image: # - myRegistrKeySecretName service: - ## Kubernetes service type + ## Kubernetes service type, ClusterIP and NodePort are supported at present type: ClusterIP port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 rootUser: ## MariaDB admin password