-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathmariadb-deployment-conf.yaml
102 lines (92 loc) · 2.14 KB
/
mariadb-deployment-conf.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-config
data:
my.cnf: |
[galera]
bind-address=0.0.0.0
[mysqld]
skip-log-bin
ssl=0
table_open_cache = 200000
table_open_cache_instances=64
#back_log=3500
#max_connections=4000
#innodb_file_per_table
#innodb_log_file_size=10G
#innodb_log_files_in_group=2
#innodb_log_buffer_size=64M
#innodb_open_files=4000
#innodb_buffer_pool_size= 100G
#innodb_buffer_pool_instances=8
#innodb_flush_log_at_trx_commit = 1
#innodb_doublewrite=1
#innodb_flush_method = O_DIRECT
#innodb_file_per_table = 1
#innodb_io_capacity=2000
#innodb_io_capacity_max=4000
#innodb_flush_neighbors = 0
#innodb_use_native_aio=1
#join_buffer_size=256K
#sort_buffer_size=256K
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: mariadb-deploy-secret
labels:
app: mariadb
type: database
spec:
replicas: 1
template:
metadata:
labels:
app: mariadb
type: database
spec:
volumes:
- name: config-volume
configMap:
name: mysql-config
containers:
- name: mariadb
image: docker.io/clearlinux/mariadb
ports:
- containerPort: 3306
name: db-port
imagePullPolicy: Always
#args: ["--bind-address=0.0.0.0"]
volumeMounts:
- name: config-volume
mountPath: /usr/share/defaults/mariadb/my.cnf.d
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb
key: mysql-root-password
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: mariadb
key: mysql-user
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb
key: mysql-password
---
apiVersion: v1
kind: Service
metadata:
name: mariadb-svc
spec:
type: NodePort
ports:
- port: 3306
targetPort: 3306
nodePort: 30001
selector:
app: mariadb