Odstranit z2/statefulset.yaml
This commit is contained in:
parent
d1fd272d7c
commit
7302c10d87
@ -1,76 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mysql-pv
|
||||
namespace: botspace
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/mnt/data/mysql"
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mysql-pvc
|
||||
namespace: botspace
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mysql
|
||||
namespace: botspace
|
||||
spec:
|
||||
serviceName: "mysql"
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-sql-copy
|
||||
image: busybox
|
||||
command: ["sh", "-c", "cp /config/init.sql /tmp/init.sql"]
|
||||
volumeMounts:
|
||||
- name: init-sql
|
||||
mountPath: /config
|
||||
- name: tmp-sql
|
||||
mountPath: /tmp
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "0674998280tanya"
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: mysql-storage
|
||||
mountPath: /var/lib/mysql
|
||||
- name: tmp-sql
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
volumes:
|
||||
- name: mysql-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: mysql-pvc
|
||||
- name: init-sql
|
||||
configMap:
|
||||
name: init-sql
|
||||
- name: tmp-sql
|
||||
emptyDir: {}
|
Loading…
Reference in New Issue
Block a user