apiVersion: apps/v1
kind: Deployment
metadata:
  name: hub
  namespace: hub
  labels:
    app.kubernetes.io/name: hub
    app.kubernetes.io/part-of: hub
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: hub
      app.kubernetes.io/part-of: hub
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: hub
        app.kubernetes.io/part-of: hub
    spec:
      initContainers:
      - name: mkdir
        image: busybox
        command: ['sh', '-c', 'mkdir /app/dist/video/blinkypi0 /app/dist/video/outside;']
        volumeMounts:
        - mountPath: /app/dist/video
          name: ffmpeg-volume
      containers:
      - name: ffmpeg-blinkypi0
        image: jonpulsifer/hub:main
        args:
        - yarnpkg
        - ffmpeg-blinkypi0
        resources: {}
        volumeMounts:
        - mountPath: /app/dist/video
          name: ffmpeg-volume
      - name: ffmpeg-outside
        image: jonpulsifer/hub:main
        args:
        - yarnpkg
        - ffmpeg-outside
        resources: {}
        volumeMounts:
        - mountPath: /app/dist/video
          name: ffmpeg-volume
      - name: hub
        image: jonpulsifer/hub:main
        imagePullPolicy: Always
        args:
        - node
        - dist/server.js
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
        volumeMounts:
        - mountPath: /app/dist/video
          name: ffmpeg-volume
      volumes:
      - name: ffmpeg-volume
        emptyDir: {}
