apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-watchdog
  namespace: web
  labels:
    app: demo-man
    svc: watchdog
spec:
  selector:
    matchLabels:
      app: demo-man
      svc: watchdog
  template:
    metadata:
      labels:
        app: demo-man
        svc: watchdog
    spec:
      imagePullSecrets:
      - name: github
      - name: gitlab
      containers:
      - name: watchdog
        imagePullPolicy: Always
        image: registry.git.rwth-aachen.de/z-cloud/demo-man/watchdog:latest
        env:
        - name: VOLUME
          value: "/app/files"
        - name: PUBLIC_PATH
          value: '{"prefix": "https", "hostname": "demo.zoomoid.de", "dir": "files/"}'
        - name: API_ENDPOINT
          value: http://demo-api:8080/api/v1/demo
        - name: TOKEN 
          valueFrom:
            secretKeyRef:
              name: demo-man-api-token
              key: token
        volumeMounts:
        - mountPath: "/app/files"
          name: audio-volume
        resources:
          limits:
            memory: "256Mi"
            cpu: "200m"
      volumes:
      - name: audio-volume
        persistentVolumeClaim:
          claimName: demo-audio-pvc
      restartPolicy: Always
