fix(myorg-assistant): git-sync self-heals clone + normalizes gitea host to git.rogi.casa #26
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/myorg-git-sync-clone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
The
myorg-git-syncCronJob (runs every 15m) failed with:Two contributing causes:
git pull/git pushagainst/data/myorgbut never cloned the repo. The clone was solely the Deployment's initContainer's job; when that didn't populate the volume, every cron run failed.GIT_REPO_URLsecret historically pointed atgitea.rogi.casa— the wrong Gitea subdomain.gitea.rogi.casareturns Cloudflare 526 (origin unreachable), so any clone/pull against it fails. The correct subdomain isgit.rogi.casa.The job swallowed the error and exited 0, so it looked successful while silently never syncing (confirmed via Loki across every
myorg-git-sync-*pod for 24h+).Fix
In
myorg-assistant/cronjobs/git-sync.yaml:git-cloneinitContainer (guarded byif [ ! -d /data/myorg/.git ]), mirroring the Deployment's, so the cron job self-heals and clones on first run.GIT_REPO_URLhost togit.rogi.casaat runtime (sed), so the clone works even if the cluster secret still contains the stalegitea.rogi.casahost. This directly addresses the subdomain mismatch the user identified.Evidence
{namespace="myorg-assistant",pod=~"myorg-git-sync.+"}→Not a git repository: /data/myorgon every run for 24h+gitea.rogi.casa→ HTTP 526 (Cloudflare);git.rogi.casa→ reachable (git smart-HTTP works)myorg-assistant-7dbc9b7775-xvgv7Running, 0 restarts; failure isolated to the cron podRisk
Low. The initContainer mirrors the already-shipping Deployment initContainer. Host-normalization is idempotent. No RBAC/CRD/ArgoCD/volume/PVC changes. Secrets unchanged (manifest just rewrites the host at runtime).
Note (out of scope)
The other
myorg-*CronJobs fail a different error:pydantic Settings: Field required(missingLITELLM_ENDPOINT/LITELLM_MODELetc. vs the Deployment env). Separate PR can address that.🤖 Generated by Hermes Platform Engineer
fix(myorg-assistant): add git-clone initContainer to git-sync CronJobto fix(myorg-assistant): git-sync self-heals clone + normalizes gitea host to git.rogi.casa