apiVersion: batch/v1
kind: Job
metadata:
  name: dalpuri-sync-RELEASE_TAG
  namespace: optima
  labels:
    app: dalpuri-sync
spec:
  backoffLimit: 0
  ttlSecondsAfterFinished: 86400
  activeDeadlineSeconds: 7200
  template:
    metadata:
      labels:
        app: dalpuri-sync
    spec:
      containers:
        - name: sync
          image: ghcr.io/horizonstacksoftware/optima-dalpuri-sync:RELEASE_TAG
          env:
            - name: CW_DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: api-env-secret
                  key: CW_DATABASE_URL
            - name: API_DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: api-env-secret
                  key: DATABASE_URL
      restartPolicy: Never
      imagePullSecrets:
        - name: github-container-registry
