From c75c04ea1c2250f16c1aabe57a2d4e94d986a90e Mon Sep 17 00:00:00 2001 From: "Chen, Haochuan Z" Date: Wed, 5 Aug 2020 03:08:14 +0000 Subject: [PATCH 13/13] enable Values.conf.database.config_override for mariadb option wsrep_provider_options override --- mariadb/templates/configmap-etc.yaml | 5 ++--- mariadb/templates/statefulset.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mariadb/templates/configmap-etc.yaml b/mariadb/templates/configmap-etc.yaml index 53072f4..7bdfd8a 100644 --- a/mariadb/templates/configmap-etc.yaml +++ b/mariadb/templates/configmap-etc.yaml @@ -26,14 +26,13 @@ data: {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "00_base" ) "key" "00-base.cnf" ) | indent 2 }} {{- if $envAll.Values.conf.database.config_override }} {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "config_override" ) "key" "20-override.cnf" ) | indent 2 }} -{{- else }} +{{- end }} # A user override for conf.database.config_override might break the IPv6 system overrides, need including below ipv6 # config for ipv6 case in user override as well. {{- if $envAll.Values.manifests.config_ipv6 }} - 20-override.cnf: | + 30-override.cnf: | [mysqld] bind_address=:: {{- end }} -{{- end }} {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "99_force" ) "key" "99-force.cnf" ) | indent 2 }} {{- end }} diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml index 3ef7383..88439e2 100644 --- a/mariadb/templates/statefulset.yaml +++ b/mariadb/templates/statefulset.yaml @@ -216,12 +216,18 @@ spec: mountPath: /etc/mysql/conf.d/00-base.cnf subPath: 00-base.cnf readOnly: true - {{- if or (.Values.conf.database.config_override) (.Values.manifests.config_ipv6) }} + {{- if .Values.conf.database.config_override }} - name: mariadb-etc mountPath: /etc/mysql/conf.d/20-override.cnf subPath: 20-override.cnf readOnly: true {{- end }} + {{- if .Values.manifests.config_ipv6 }} + - name: mariadb-etc + mountPath: /etc/mysql/conf.d/30-override.cnf + subPath: 30-override.cnf + readOnly: true + {{- end }} - name: mariadb-etc mountPath: /etc/mysql/conf.d/99-force.cnf subPath: 99-force.cnf -- 1.8.3.1