apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-galera
  labels:
    app: mysql-galera
data:
  galera.cnf: |
   [mysqld]
   binlog_format=ROW
   default-storage-engine=innodb
   innodb_autoinc_lock_mode=2
   bind-address=0.0.0.0
 
   # Galera Provider Configuration
   wsrep_on=ON
   wsrep_provider=/usr/lib/galera/libgalera_smm.so
 
   # Galera Cluster Configuration
   wsrep_cluster_name="galera_cluster"
   wsrep_cluster_address="gcomm://${CLUSTER_IPS}"
 
   # Galera Synchronization Configuration
   wsrep_sst_method=rsync
   wsrep_provider_options="gcache.size=128Mb"
   wsrep_provider_options="gcache.recover=yes"
   # Galera Node Configuration
   wsrep_node_address="${NODE_IP}"
   wsrep_node_name="${NODE_NAME}" 