harbor/make/kubernetes/mysql/mysql.deploy.yaml

33 lines
741 B
YAML
Raw Normal View History

apiVersion: extensions/v1beta1
kind: Deployment
2016-04-03 05:27:56 +02:00
metadata:
name: mysql
2016-04-03 05:27:56 +02:00
labels:
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
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