fix(myorg-assistant): mirror Deployment env (GIT_*, WEB_SECRET_KEY) into all cronjobs

The myorg-assistant Deployment's Settings() requires WEB_SECRET_KEY (and the
GIT_* set for git-sync/deadline-checker). The cronjobs only carried a subset,
so every run crashed at import with:
  pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
    web_secret_key [type=missing]

myorg-git-sync was crash-looping (4.19 restarts/15m, pod 29731995-wbdnx).
deadline-checker/evening-summary/morning-briefing/waiting-followup were also
missing the full env set (git-sync already had GIT_*, but lacked WEB_SECRET_KEY;
the others lacked both GIT_* and WEB_SECRET_KEY).

Mirror the Deployment's full required env (GIT_REPO_URL/USERNAME/TOKEN/BRANCH
from secret/configmap, WEB_SECRET_KEY from secret) into every cronjob so
import-time Settings() validation passes for all. Supersedes the incomplete
PRs #19/#20/#21 (which added only WEB_SECRET_KEY and left the GIT_* gap).

Roger: merge -> ArgoCD self-heals, loop stops.
This commit is contained in:
platform-engineer-agent
2026-07-13 05:23:32 +00:00
parent a5b90994a4
commit 59c2bfb090
5 changed files with 105 additions and 0 deletions

View File

@@ -35,6 +35,26 @@ spec:
- morning-briefing
env:
# From ConfigMap
- name: GIT_REPO_URL
valueFrom:
secretKeyRef:
name: myorg-assistant-secret
key: GIT_REPO_URL
- name: GIT_USERNAME
valueFrom:
secretKeyRef:
name: myorg-assistant-secret
key: GIT_USERNAME
- name: GIT_TOKEN
valueFrom:
secretKeyRef:
name: myorg-assistant-secret
key: GIT_TOKEN
- name: GIT_BRANCH
valueFrom:
configMapKeyRef:
name: myorg-assistant-config
key: GIT_BRANCH
- name: MYORG_REPO_PATH
valueFrom:
configMapKeyRef:
@@ -61,6 +81,11 @@ spec:
secretKeyRef:
name: myorg-assistant-secret
key: LITELLM_API_KEY
- name: WEB_SECRET_KEY
valueFrom:
secretKeyRef:
name: myorg-assistant-secret
key: WEB_SECRET_KEY
volumeMounts:
- name: myorg-data
mountPath: /data/myorg