apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: push-send-queued-cronjob
spec:
  schedule: "*/1 8-20 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      backoffLimit: 0
      activeDeadlineSeconds: 300
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: push-send-queued
              image: docker.pkg.github.com/demokratie-live/democracy-development/push-send-queued:0.1.16
              envFrom:
                - configMapRef:
                    name: push-notifications-config
                - secretRef:
                    name: push-notifications-secrets
                    optional: true
              env:
                - name: DB_URL
                  valueFrom:
                    configMapKeyRef:
                      name: democracy-api-config
                      key: DB_URL
                - name: BUNDESTAGIO_SERVER_URL
                  valueFrom:
                    configMapKeyRef:
                      name: democracy-api-config
                      key: BUNDESTAGIO_SERVER_URL
          imagePullSecrets:
            - name: regcred
