apiVersion: batch/v1
kind: Job
metadata:
  name: app6-job
  namespace: default
spec:
  backoffLimit: 1
  template:
    metadata:
      annotations:
        ovai.asaintsever.org/inject: "true"
        ovai.asaintsever.org/secrets-type: "static" # static secrets
        # When dealing with static secrets: no need to explicitly enable 'job' mode. You can remove annotation below
        ovai.asaintsever.org/mode: "job" # Explicitly enable 'job' mode (will also enable 'secrets' mode).
      labels:
        com.ovai.application: test
        com.ovai.service: test-app-svc
    spec:
      restartPolicy: Never
      # When dealing with static secrets without other modes: no need for a custom serviceAccountName 
      serviceAccountName: default
      containers:
        - name: app6-job-container
          image: busybox:1.28
          command:
            - "sh"
            - "-c"
            - |
              set -e
              echo "Job started"
              echo "I am a job... still working - 1"
              cat /opt/ovai/secrets/secrets.properties
              sleep 5
              echo "I am a job... still working - 2"
              cat /opt/ovai/secrets/secrets.properties
              sleep 5
              echo "I am a job... still working - 3"
              cat /opt/ovai/secrets/secrets.properties
              sleep 5
              echo "I am a job... still working - 4"
              cat /opt/ovai/secrets/secrets.properties
              sleep 5
              echo "I am a job... still working - 5"
              cat /opt/ovai/secrets/secrets.properties
              echo "Job stopped"
