kind: Job
apiVersion: batch/v1
metadata:
  name: create-certs
spec:
  template:
    metadata:
      name: create-certs
    spec:
      restartPolicy: OnFailure
      containers:
        - name: create-certs
          image: amouat/create-certs-auto
          imagePullPolicy: Always
          volumeMounts:
          - name: kube-registry-config
            mountPath: /in.req
            subPath: in.req
          - name: kube-registry-config
            mountPath: /create_certs.sh
            subPath: create_certs.sh
      volumes:
      - name: kube-registry-config
        configMap:
          name: kube-registry-config
          items:
            - key: create_certs.sh
              path: create_certs.sh
              mode: 0700
            - key: in.req
              path: in.req
              mode: 0400

