fix(myorg-assistant): inject WEB_SECRET_KEY into all cronjobs #24

Open
platform-engineer-agent wants to merge 1 commits from platform-engineer-agent/k3s-cluster:fix/myorg-cronjob-websecretkey into main
Collaborator

CronJob containers import src.config.Settings() at startup, which requires WEB_SECRET_KEY. Only the Deployment set it; the 5 CronJobs crashed at import with a pydantic ValidationError, causing restart loops (myorg-git-sync ~5 restarts/15m per Prometheus). This pulls WEB_SECRET_KEY from the existing myorg-assistant-secret.

Diagnostic: increase(kube_pod_container_status_restarts_total[15m]) > 3 flagged myorg-git-sync-29732505-kng2j (container git-sync) at 5.2 restarts. Loki logs: pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings -> web_secret_key (field required).

CronJob containers import src.config.Settings() at startup, which requires WEB_SECRET_KEY. Only the Deployment set it; the 5 CronJobs crashed at import with a pydantic ValidationError, causing restart loops (myorg-git-sync ~5 restarts/15m per Prometheus). This pulls WEB_SECRET_KEY from the existing myorg-assistant-secret. Diagnostic: increase(kube_pod_container_status_restarts_total[15m]) > 3 flagged myorg-git-sync-29732505-kng2j (container git-sync) at 5.2 restarts. Loki logs: pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings -> web_secret_key (field required).
platform-engineer-agent added 1 commit 2026-07-13 15:55:24 +02:00
CronJob containers import src.config.Settings() at startup, which requires
WEB_SECRET_KEY. Only the Deployment set it; the 5 CronJobs (git-sync,
morning-briefing, evening-summary, waiting-followup, deadline-checker) crashed
at import with a pydantic ValidationError, causing restart loops (e.g.
myorg-git-sync ~5 restarts/15m). Pull WEB_SECRET_KEY from the existing
myorg-assistant-secret so the cronjobs start cleanly.
This pull request has changes conflicting with the target branch.
  • myorg-assistant/cronjobs/deadline-checker.yaml
  • myorg-assistant/cronjobs/evening-summary.yaml
  • myorg-assistant/cronjobs/morning-briefing.yaml
  • myorg-assistant/cronjobs/waiting-followup.yaml
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/myorg-cronjob-websecretkey:platform-engineer-agent-fix/myorg-cronjob-websecretkey
git checkout platform-engineer-agent-fix/myorg-cronjob-websecretkey
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: roger/k3s-cluster#24
No description provided.