apiVersion: apps/v1
kind: Deployment
metadata:
  name: worker
spec:
  selector:
    matchLabels:
      app: worker
  replicas: 3
  strategy: 
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: worker
    spec:
      volumes:
        - name: youtube-folder
          persistentVolumeClaim:
            claimName: youtube-pvc
      containers:
      - name: worker
        image: thomaspilgaard/youtube-dl-worker:0.0.3
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        envFrom:
          - configMapRef:
              name: youtube-downloader
        volumeMounts:
          - name: youtube-folder
            mountPath: /mnt/storagesrv/youtube
