Merge branch 'issue-33' into 'develop'

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

See merge request ldc-web/projets/ldc!28
This commit is contained in:
noah.lancien 2025-06-17 13:52:40 +00:00
commit b399c82fb0

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