This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigmap.yaml
79 lines (79 loc) · 3.28 KB
/
configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# ConfigMap for config files
apiVersion: v1
kind: ConfigMap
metadata:
name: percona
namespace: galera
labels:
app: percona
data:
client.cnf: |
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
mysqld.cnf: |
# Template my.cnf for PXC
# Edit to your requirements.
[mysqld]
bind-address = 0.0.0.0
skip-host-cache
skip-name-resolve
server-id=1
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
#log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#log-bin
#log_slave_updates
expire_logs_days=7
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
default_storage_engine = InnoDB
innodb_file_per_table
max_connections = 300
mysqld_safe.cnf: |
#
# The Percona XtraDB Cluster 5.7 configuration file.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld_safe]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
nice = 0
wsrep.cnf: |
[mysqld]
# Path to Galera library
wsrep_provider=/usr/lib/galera3/libgalera_smm.so
# Cluster connection URL contains IPs of nodes
#If no IP is found, this implies that a new cluster needs to be created,
#in order to do that you need to bootstrap this node
wsrep_cluster_address = gcomm://percona-0.percona,percona-1.percona,percona-2.percona
# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
# MyISAM storage engine has only experimental support
default_storage_engine=InnoDB
# Slave thread to use
wsrep_slave_threads= 8
wsrep_log_conflicts
# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
innodb_autoinc_lock_mode=2
# Node IP address
#wsrep_node_address=192.168.70.63
# Cluster name
wsrep_cluster_name=PERCONA-CLUSTER
#If wsrep_node_name is not specified, then system hostname will be used
#wsrep_node_name=pxc-cluster-node-1
#pxc_strict_mode allowed values: DISABLED,PERMISSIVE,ENFORCING,MASTER
pxc_strict_mode=ENFORCING
# SST method
wsrep_sst_method=xtrabackup-v2
#Authentication for SST method
wsrep_sst_auth="root:"
wsrep_retry_autocommit = 4