{% if taskserv.wp_cron_enabled %} apiVersion: batch/v1 kind: CronJob metadata: name: {{ taskserv.name }}-wpcron namespace: {{ taskserv.namespace }} labels: app.kubernetes.io/name: {{ taskserv.name }} app.kubernetes.io/managed-by: provisioning spec: schedule: "{{ taskserv.wp_cron_schedule }}" concurrencyPolicy: Forbid successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 jobTemplate: spec: template: spec: restartPolicy: OnFailure containers: - name: wpcron image: curlimages/curl:latest command: - curl - -sf - -o - /dev/null - --max-time - "30" - -H - "Host: {{ taskserv.domain }}" - "http://{{ taskserv.name }}/wp-cron.php?doing_wp_cron" resources: requests: cpu: "10m" memory: "16Mi" limits: cpu: "50m" memory: "32Mi" {% endif %}