apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      name: mysql-pod
      app: cryptowallet-server
  template:
    metadata:
      labels:
        name: mysql-pod
        app: cryptowallet-server
    spec:
      containers:
        - name: mysql
          image: mysql:8.0.18
          envFrom:
            - secretRef:
                name: mysql-config
          ports:
            - containerPort: 3306
          volumeMounts:
            - name: mysql-persistent-storage
              mountPath: /var/lib/mysql
      volumes:
        - name: mysql-persistent-storage
          gcePersistentDisk:
            pdName: mysql-disk
            fsType: ext4
