fix: 🐛 post scheduled not published -> wp_disable_cron=true

This commit is contained in:
Karl 2025-06-10 10:26:22 +02:00
parent c1f2ead0f5
commit 562cd74841

View file

@ -263,3 +263,44 @@ spec:
fsGroup: 33
fsGroupChangePolicy: "OnRootMismatch"
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: ${CI_PROJECT_PATH_SLUG}-cronjob-publish-posts
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- ${CI_PROJECT_PATH_SLUG}-app
topologyKey: "kubernetes.io/hostname"
namespaces: [$KUBE_NAMESPACE]
containers:
- name: ${CI_PROJECT_PATH_SLUG}-scheduled
image: $IMAGE_TAG
imagePullPolicy: IfNotPresent
command: ["sh", "-c"]
args:
- curl -sf https://${REDIRECT}${APP_DOMAIN}/wp/wp-cron.php?doing_wp_cron
envFrom:
- configMapRef:
name: ${CI_PROJECT_PATH_SLUG}-config-map
imagePullSecrets:
- name: docker-registry-credentials
securityContext:
runAsUser: 33
runAsGroup: 33
fsGroup: 33
fsGroupChangePolicy: "OnRootMismatch"
restartPolicy: OnFailure