kind: Job
apiVersion: batch/v1
metadata:
  name: copy-certs
spec:
  template:
    metadata:
      name: copy-certs
    spec:
      restartPolicy: OnFailure
      serviceAccountName: registry-secret-manager
      containers:
        - name: copy-certs
          image: amouat/copy-certs-auto
          imagePullPolicy: Always
          volumeMounts:
            - mountPath: /etc/docker
              name: cert-dir
            - mountPath: /hostfile
              name: host-dir
      volumes:
        - name: cert-dir
          hostPath: 
            path: /etc/docker
        - name: host-dir
          hostPath: 
            path: /etc/hosts
