2023-06-05 18:55:26 +08:00
|
|
|
---
|
|
|
|
# configMap
|
|
|
|
# set global max_connections = 5000
|
|
|
|
# set global wait_timeout = 600
|
|
|
|
|
|
|
|
---
|
2023-06-01 19:28:28 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ReplicationController
|
|
|
|
metadata:
|
|
|
|
name: mysql-axons
|
|
|
|
namespace: basic
|
|
|
|
labels:
|
|
|
|
name: mysql-axons
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
name: mysql-axons
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
name: mysql-axons
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: mysql-axons
|
|
|
|
image: mysql:8.0.33
|
2023-08-28 18:40:18 +08:00
|
|
|
args: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--max_connections=2000", "--binlog_expire_logs_seconds=432000"]
|
2023-06-01 19:28:28 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 3306
|
|
|
|
volumeMounts:
|
|
|
|
- name: data-axons
|
|
|
|
mountPath: /var/lib/mysql
|
|
|
|
env:
|
|
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
|
|
value: "Beaconfire@2099"
|
|
|
|
- name: MYSQL_DATABASE
|
|
|
|
value: "event_store"
|
2023-08-28 10:59:16 +08:00
|
|
|
volumes:z
|
2023-06-01 19:28:28 +08:00
|
|
|
- name: data-axons
|
|
|
|
hostPath:
|
|
|
|
path: /data/staff-axon/mysql
|
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
nodeSelectorTerms:
|
|
|
|
- matchExpressions:
|
|
|
|
- key: "kubernetes.io/hostname"
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- bfs-k8snode-10-2-1-6.hetzner.base.beaconfireinc.com
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: mysql-axons
|
|
|
|
namespace: basic
|
|
|
|
labels:
|
|
|
|
name: mysql-axons
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 3306
|
|
|
|
targetPort: 3306
|
|
|
|
nodePort: 30016
|
|
|
|
selector:
|
|
|
|
name: mysql-axons
|
|
|
|
type: NodePort
|