fix(myorg-assistant): normalize GIT_REPO_URL host to git.rogi.casa in git-sync #27

Open
platform-engineer-agent wants to merge 1 commits from fix/gitsync-host-normalize into main
Collaborator

Context

PR #26 added the git-clone initContainer to myorg-git-sync but still trusted the GIT_REPO_URL secret verbatim. The actual git-sync failure is the subdomain: the secret (and the clone URL it produces) points at gitea.rogi.casa, which returns Cloudflare 526 (origin unreachable). The working Gitea subdomain is git.rogi.casa.

Result: even with the initContainer, git clone ${GIT_REPO_URL} hit gitea.rogi.casa -> 526 -> no /data/myorg/.git -> Not a git repository.

Fix

Normalize the GIT_REPO_URL host to git.rogi.casa at runtime (sed) inside the git-clone initContainer, so the clone succeeds regardless of the secret's stale host. Idempotent — if the secret is already correct, the sed is a no-op.

Evidence

  • curl https://gitea.rogi.casa/ -> HTTP 526 (Cloudflare)
  • git ls-remote https://git.rogi.casa/... -> works (smart-HTTP reachable)
  • Loki: {namespace="myorg-assistant",pod=~"myorg-git-sync.+"} -> Not a git repository: /data/myorg every run

Risk

Low. Single-line sed in an initContainer that already exists (from #26). No secret/volume/RBAC changes.

🤖 Generated by Hermes Platform Engineer

## Context PR #26 added the `git-clone` initContainer to `myorg-git-sync` but still trusted the `GIT_REPO_URL` secret verbatim. The actual git-sync failure is the **subdomain**: the secret (and the clone URL it produces) points at `gitea.rogi.casa`, which returns Cloudflare **526** (origin unreachable). The working Gitea subdomain is **`git.rogi.casa`**. Result: even with the initContainer, `git clone ${GIT_REPO_URL}` hit `gitea.rogi.casa` -> 526 -> no `/data/myorg/.git` -> `Not a git repository`. ## Fix Normalize the `GIT_REPO_URL` host to `git.rogi.casa` at runtime (sed) inside the git-clone initContainer, so the clone succeeds regardless of the secret's stale host. Idempotent — if the secret is already correct, the sed is a no-op. ## Evidence - `curl https://gitea.rogi.casa/` -> HTTP 526 (Cloudflare) - `git ls-remote https://git.rogi.casa/...` -> works (smart-HTTP reachable) - Loki: `{namespace="myorg-assistant",pod=~"myorg-git-sync.+"}` -> `Not a git repository: /data/myorg` every run ## Risk Low. Single-line sed in an initContainer that already exists (from #26). No secret/volume/RBAC changes. 🤖 Generated by Hermes Platform Engineer
platform-engineer-agent added 1 commit 2026-07-19 18:14:00 +02:00
PR #26 added the git-clone initContainer but still trusted the GIT_REPO_URL
secret verbatim. That secret historically contains gitea.rogi.casa, which
526s through Cloudflare, so the clone still fails with 'Not a git repository'.

Normalize the host to git.rogi.casa at runtime (sed) so the clone works
regardless of the secret's stale host. Directly addresses the subdomain bug.
Checking for merge conflicts ...
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/gitsync-host-normalize:fix/gitsync-host-normalize
git checkout fix/gitsync-host-normalize
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#27
No description provided.