apiVersion: batch/v1
kind: CronJob
metadata:
  namespace: bigeye
  name: bigeye-datahealth-integration
  labels:
    app: bigeye-integration
spec:
  schedule: "0 3 * * *" # Update to preferred schedule
  timeZone: "UTC"
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 3
  jobTemplate:
    spec:
      backoffLimit: 3
      template:
        spec:
          containers:
          - name: bigeye-datahealth-integration
            image: docker.io/bigeyedata/datahealth-integration:latest
            env:
              - name: VAULT_TOKEN
                valueFrom:
                  secretKeyRef:
                    name: token
                    key: vault-token
            imagePullPolicy: IfNotPresent
            command:
            - bigeye-datahealth
            - run-integration
            - --hashicorp-vault-url
            - VAULT_URL
            - --hashicorp-secret-path
            - SECRET_PATH
            resources:
              requests:
                cpu: "1"
                memory: "2048"
          restartPolicy: Never
          imagePullSecrets:
            - name: bigeyecred