2017-11-24 09:02:48 +01:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
2016-04-03 05:27:56 +02:00
|
|
|
metadata:
|
2017-11-24 09:02:48 +01:00
|
|
|
name: mysql
|
2016-04-03 05:27:56 +02:00
|
|
|
labels:
|
2017-11-24 09:02:48 +01:00
|
|
|
name: mysql
|
2016-04-03 05:27:56 +02:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2016-11-21 09:07:04 +01:00
|
|
|
name: mysql-apps
|
2016-04-03 05:27:56 +02:00
|
|
|
spec:
|
|
|
|
containers:
|
2016-11-21 09:07:04 +01:00
|
|
|
- name: mysql-app
|
2017-09-25 11:25:16 +02:00
|
|
|
image: vmware/harbor-db:v1.2.0
|
2016-11-21 09:07:04 +01:00
|
|
|
imagePullPolicy: IfNotPresent
|
2016-04-03 05:27:56 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 3306
|
|
|
|
env:
|
|
|
|
- name: MYSQL_ROOT_PASSWORD
|
2016-11-21 09:07:04 +01:00
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: harbor-mysql-config
|
|
|
|
key: MYSQL_ROOT_PASSWORD
|
2016-04-03 05:27:56 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: mysql-storage
|
|
|
|
mountPath: /var/lib/mysql
|
|
|
|
volumes:
|
|
|
|
- name: mysql-storage
|
2016-11-21 09:07:04 +01:00
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: storage-pvc
|