apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kitchenowl
  name: kitchenowl-web
spec:
  replicas: 1
  selector:
    matchLabels:
      component: kitchenowl-web
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        component: kitchenowl-web
    spec:
      containers:
        - image: docker.io/tombursch/kitchenowl-web:v0.4.4
          imagePullPolicy: Always
          name: web
          ports:
            - containerPort: 80
              name: web
              protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kitchenowl-ch
  name: kitchenowl-api
spec:
  replicas: 1
  selector:
    matchLabels:
      component: kitchenowl-api
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        component: kitchenowl-api
    spec:
      containers:
        - image: docker.io/tombursch/kitchenowl:v63
          imagePullPolicy: Always
          name: api
          envFrom:
            - secretRef:
                name: kitchenowl
          ports:
            - containerPort: 5000
              name: api
              protocol: TCP
            - containerPort: 80
              name: web
              protocol: TCP
          volumeMounts:
            - name: data
              mountPath: /data
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: data
