---
apiVersion: batch/v1
kind: Job
metadata:
  name: k8srealm-secret-generator
  namespace: default
spec:
  backoffLimit: 3
  template:
    spec:
      containers:
        - args:
            - /scripts/generate-secrets.sh
          command:
            - /bin/bash
          image: ghcr.io/silogen/kubectl:latest
          name: k8srealm-secret-generator
          volumeMounts:
            - mountPath: /scripts
              name: script-volume
      restartPolicy: OnFailure
      serviceAccountName: k8srealm-secret-generator-sa
      volumes:
        - configMap:
            defaultMode: 493
            name: k8srealm-secret-generator-script
          name: script-volume
