apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    litmuschaos.io/chaos: "true"
  labels:
    app: sock-shop
    name: catalogue-db
  name: catalogue-db
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sock-shop
      name: catalogue-db
  template:
    metadata:
      labels:
        app: sock-shop
        name: catalogue-db
    spec:
      containers:
      - env:
        - name: MYSQL_ROOT_PASSWORD
          value: fake_password
        - name: MYSQL_DATABASE
          value: socksdb
        image: weaveworksdemos/catalogue-db:0.3.0
        imagePullPolicy: IfNotPresent
        name: catalogue-db
        ports:
        - containerPort: 3306
          name: mysql
          protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  name: catalogue-db
  labels:
    name: catalogue-db
  namespace: sock-shop
spec:
  ports:
    # the port that this service should serve on
  - port: 3306
    targetPort: 3306
  selector:
    name: catalogue-db

