questionbank mysql

main
ycz 2025-06-11 11:12:42 +08:00
parent e2058ffd5a
commit 609abf0c4f
1 changed files with 12 additions and 12 deletions

View File

@ -1,17 +1,17 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql-qb
name: mysql-questionbank
spec:
replicas: 1
serviceName: mysql-qb
serviceName: mysql-questionbank
selector:
matchLabels:
app: mysql-qb
app: mysql-questionbank
template:
metadata:
labels:
app: mysql-qb
app: mysql-questionbank
spec:
initContainers:
- name: init
@ -27,21 +27,21 @@ spec:
securityContext:
privileged: true
containers:
- name: mysql-qb
- name: mysql-questionbank
image: mysql:8.0.33
args: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--max_connections=4000", "--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=4000", "--binlog_expire_logs_seconds=432000","--sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION","--lower_case_table_names=1"]
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-data-qb
- name: mysql-data-questionbank
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "Beaconfire@2099"
volumes:
- name: mysql-data-qb
- name: mysql-data-questionbank
hostPath:
path: /data/prod/mysql-qb
path: /data/prod/mysql-questionbank
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
@ -55,9 +55,9 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: mysql-qb
name: mysql-questionbank
labels:
app: mysql-qb
app: mysql-questionbank
spec:
ports:
- protocol: TCP
@ -65,5 +65,5 @@ spec:
targetPort: 3306
nodePort: 30336
selector:
app: mysql-qb
app: mysql-questionbank
type: NodePort