optimize domain add api
parent
00bc621c20
commit
e2058ffd5a
|
@ -1,17 +1,17 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: mysql-qb
|
name: mysql-questionbank
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
serviceName: mysql-qb
|
serviceName: mysql-questionbank
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: mysql-qb
|
app: mysql-questionbank
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: mysql-qb
|
app: mysql-questionbank
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init
|
- name: init
|
||||||
|
@ -27,21 +27,21 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
containers:
|
containers:
|
||||||
- name: mysql-qb
|
- name: mysql-questionbank
|
||||||
image: mysql:8.0.33
|
image: mysql:8.0.33
|
||||||
args: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--max_connections=2000", "--binlog_expire_logs_seconds=432000","--sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"]
|
args: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--max_connections=2000", "--binlog_expire_logs_seconds=432000","--sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION","--lower_case_table_names=1"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3306
|
- containerPort: 3306
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: mysql-data-qb
|
- name: mysql-data-questionbank
|
||||||
mountPath: /var/lib/mysql
|
mountPath: /var/lib/mysql
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_ROOT_PASSWORD
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
value: "Beaconfire@2099"
|
value: "Beaconfire@2099"
|
||||||
volumes:
|
volumes:
|
||||||
- name: mysql-data-qb
|
- name: mysql-data-questionbank
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /data/dev/mysql-qb
|
path: /data/dev/mysql-questionbank
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
@ -55,9 +55,9 @@ spec:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mysql-qb
|
name: mysql-questionbank
|
||||||
labels:
|
labels:
|
||||||
app: mysql-qb
|
app: mysql-questionbank
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
|
@ -65,5 +65,5 @@ spec:
|
||||||
targetPort: 3306
|
targetPort: 3306
|
||||||
nodePort: 30336
|
nodePort: 30336
|
||||||
selector:
|
selector:
|
||||||
app: mysql-qb
|
app: mysql-questionbank
|
||||||
type: NodePort
|
type: NodePort
|
Loading…
Reference in New Issue