[COMMON][MARIADB] Force Galera Node address
[oom.git] / kubernetes / common / mariadb-galera / templates / statefulset.yaml
index caa5062..bde971f 100644 (file)
@@ -100,6 +100,12 @@ spec:
               value: {{ .Values.galera.name | quote }}
             - name: MARIADB_GALERA_CLUSTER_ADDRESS
               value: "gcomm://{{ template "common.name" . }}-headless.{{ include "common.namespace" . }}.svc.{{ .Values.global.clusterDomain }}"
+            # Bitnami init script don't behave well in dual stack env.
+            # set it here as long as https://github.com/bitnami/charts/issues/4077 is not solved.
+            - name: MARIADB_GALERA_NODE_ADDRESS
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
             - name: MARIADB_ROOT_USER
               value: {{ .Values.rootUser.user | quote }}
             - name: MARIADB_ROOT_PASSWORD