apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: cron-composites-lib-unb-ca
  namespace: prod
  labels:
    app: drupal
    tier: cron
spec:
  schedule: "00,15,30,45 * * * *"
  startingDeadlineSeconds: 480
  concurrencyPolicy: Forbid
  jobTemplate:
    metadata:
      name: cron-composites-lib-unb-ca
      labels:
        app: drupal
        tier: cron
    spec:
      template:
        spec:
          nodeSelector:
            deployenv: prod
          containers:
            -
              name: cron-composites-lib-unb-ca
              command:
                - /scripts/drupalCronEntry.sh
              env:
                -
                  name: DEPLOY_ENV
                  value: prod
                -
                  name: MYSQL_HOSTNAME
                  value: drupal-mysql-lib-unb-ca
                -
                  name: MYSQL_PORT
                  value: "3306"
              image: "||DEPLOYMENTIMAGE||"
              imagePullPolicy: Always
              volumeMounts:
                -
                  mountPath: /app/html/sites/default
                  name: drupal-persistent-storage
          priorityClassName: cron-priority-services
          imagePullSecrets:
            -
              name: github-container-registry-auth
          restartPolicy: Never
          volumes:
            -
              name: drupal-persistent-storage
              persistentVolumeClaim:
                claimName: composites-lib-unb-ca
