apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: letsencrypt-to-vault 
spec:
  concurrencyPolicy: Forbid
  schedule: "0 0 1 */3 *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: letsencrypt-to-vault
            image: ket4yii/letsencrypt-to-vault
            args: ["renew", "-t", "something-uuidgenerated", "-p", "/secret/my/certs/certs", "-a", "http://vault.addr:8200"]
            volumeMounts:
            - name: certs
              mountPath: /secret/my/certs/certs
          restartPolicy: OnFailure
          volumes:
          - name: certs
            hostPath:
              path: /etc/certs
