StarlingX OpenStack Armada App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

57 lines
2.5 KiB

From 64815b6eef92a949e607c7382ac3c93f568497c1 Mon Sep 17 00:00:00 2001
From: "Liu, ZhipengS" <zhipengs.liu@intel.com>
Date: Thu, 28 May 2020 08:03:42 +0000
Subject: [PATCH] Add mariadb database config override to support ipv6
Signed-off-by: Liu, ZhipengS <zhipengs.liu@intel.com>
---
mariadb/templates/configmap-etc.yaml | 8 ++++++++
mariadb/templates/statefulset.yaml | 2 +-
mariadb/values.yaml | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/mariadb/templates/configmap-etc.yaml b/mariadb/templates/configmap-etc.yaml
index feb1714..866028d 100644
--- a/mariadb/templates/configmap-etc.yaml
+++ b/mariadb/templates/configmap-etc.yaml
@@ -26,6 +26,14 @@ 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 }}
+# 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: |
+ [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 83e135f..3ef7383 100644
--- a/mariadb/templates/statefulset.yaml
+++ b/mariadb/templates/statefulset.yaml
@@ -216,7 +216,7 @@ spec:
mountPath: /etc/mysql/conf.d/00-base.cnf
subPath: 00-base.cnf
readOnly: true
- {{- if .Values.conf.database.config_override }}
+ {{- if or (.Values.conf.database.config_override) (.Values.manifests.config_ipv6) }}
- name: mariadb-etc
mountPath: /etc/mysql/conf.d/20-override.cnf
subPath: 20-override.cnf
diff --git a/mariadb/values.yaml b/mariadb/values.yaml
index 444bba3..880b31e 100644
--- a/mariadb/values.yaml
+++ b/mariadb/values.yaml
@@ -671,4 +671,5 @@ manifests:
service_error: true
service: true
statefulset: true
+ config_ipv6: false
...
--
1.8.3.1