apiVersion: batch/v1
kind: Job
metadata:
  name: microservice-operator
spec:
  template:
    spec:
      serviceAccountName: microservice-operator
      restartPolicy: OnFailure
      containers:
        - name: microservice-operator
          image: lreimer/microservice-operator:1.0
          imagePullPolicy: Always
          securityContext:
            privileged: true
          volumeMounts:
            - name: dev
              mountPath: /dev
            - name: run
              mountPath: /run
            - name: var-run
              mountPath: /var/run
            - name: sys
              mountPath: /sys
            - name: log
              mountPath: /var/log
      volumes:
        - name: dev
          hostPath:
            path: /dev
        - name: run
          hostPath:
            path: /run
        - name: var-run
          hostPath:
            path: /var/run
        - name: sys
          hostPath:
            path: /sys
        - name: log
          hostPath:
            path: /var/log
