From de670b2c18f23ef47f91157a1fce9faf5152b4f1 Mon Sep 17 00:00:00 2001 From: Valentin Ouvrard Date: Tue, 22 Aug 2023 15:12:55 +1100 Subject: [PATCH] feat(ipv6Cluster): implement the new value ipv6cluster and modify galera config --- pkg/config/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index f92a8e3..04f3acb 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -56,6 +56,11 @@ wsrep_sst_method="{{ .SST }}" {{- if .SSTAuth }} wsrep_sst_auth="root:{{ .RootPassword }}" {{- end }} +{{- if .Ipv6Cluster }} +wsrep_provider_options="gmcast.listen_addr=tcp://[::]:4567;" +[sst] +sockopt=",pf=ip6" +{{- end }} `) buf := new(bytes.Buffer) clusterAddr, err := c.clusterAddress() @@ -70,6 +75,7 @@ wsrep_sst_auth="root:{{ .RootPassword }}" err = tpl.Execute(buf, struct { ClusterAddress string Threads int + Ipv6Cluster bool Pod string Service string SST string @@ -78,6 +84,7 @@ wsrep_sst_auth="root:{{ .RootPassword }}" }{ ClusterAddress: clusterAddr, Threads: *galera.ReplicaThreads, + Ipv6Cluster: *galera.Ipv6Cluster, Pod: podName, Service: statefulset.ServiceFQDNWithService( c.mariadb.ObjectMeta,