---
# Modified from https://github.com/microservices-demo/microservices-demo
# Please see this repository for the original

apiVersion: apps/v1
kind: Deployment
metadata:
  name: catalogue-db
  labels:
    name: catalogue-db
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      name: catalogue-db
  template:
    metadata:
      labels:
        name: catalogue-db
    spec:
      containers:
      - name: catalogue-db
        image: weaveworksdemos/catalogue-db:0.3.0
        envFrom:
        - configMapRef:
            name: catalogue-db
        env:
        - name: MYSQL_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              name: catalogue-db
              key: password
        ports:
        - name: mysql
          containerPort: 3306