apiVersion: batch/v1
kind: Job
metadata:
  name:  vault-auto-detect-command
spec:
  backoffLimit: 0
  completions: 1
  parallelism: 1
  template:
    metadata:
      name:  vault-auto-detect-command
      annotations:
        vvault.secret.manager/enabled: "true"
        vvault.secret.manager/service: "https://vault.default.svc.cluster.local:8200"
        vvault.secret.manager/role: "tester"
        vvault.secret.manager/path: "secrets/v1/some/secrets/path"
        vvault.secret.manager/tls-secret: "vault-consul-ca"
        vvault.secret.manager/use-secret-names-as-keys: "true"
    spec:
      restartPolicy: Never
      serviceAccountName: tester
      containers:
      - name: alpine
        image: docker.io/innovia/secrets-consumer-webhook-detect-cmd:0.1.0
        env:
        - name: API_KEY
          value: vault:API_KEY
        resources:
            limits:
              cpu: 0.5m
              memory: 100M
