fix: set GITHUB_PAT in routing pod k8s secret to enable GitHub repo creation in project_create #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
project_createskips the GitHub repo creation step whens.cfg.GitHub == nil.This happens when
GITHUB_PATis not set in the routing pod environment.The code in
handlers.gois correct:But without
GITHUB_PATset, the GitHub client is never initialised incmd/routing/main.go:This means the GitHub repo is never created, and subsequently the push-mirror sync
fails because it has no destination to push to.
Observed during e2e test on 2026-05-18:
test-throwaway-001was created on Gitea,mirror was configured, but GitHub repo never appeared. Required manual intervention:
create GitHub repo via API, delete and recreate mirror with PAT, trigger sync manually.
Fix
Set
GITHUB_PATas a k8s secret in the routing pod deployment on koala.1. Create the secret
Or add to the existing SOPS-encrypted secrets file for the routing pod.
2. Mount in deployment
In
k3s/apps/routing/deployment.yaml, add env var from secret:3. Verify config loads correctly
After deploy, check routing pod logs on startup:
Currently logs
github_pat_set=falsewhich is the signal that PAT is missing.4. Also set GITHUB_OWNER
Verify
GITHUB_OWNER=mathiasbis set in the routing pod config. This is neededfor constructing the correct mirror remote URL.
Acceptance criteria
GITHUB_PATset as k8s secret in routing namespacegithub_pat_set=trueproject_createe2e test: GitHub repo appears atgithub.com/mathiasb/<name>within 60slast_error: ""after initial syncRequired GitHub PAT scopes
repo— create private/public repos, push code via mirrorRelated
internal/skills/project/handlers.go— code is correct, no changes neededcmd/routing/main.go— config loading is correct, no changes neededResolved. Verified on koala cluster 2026-05-18:
routing-secretskeys present:Deployment wires secret via
envFrom(k3s/apps/routing/deployment.yaml@fe534a6):Plus
GITHUB_OWNER=mathiasbandINFRA_REPO=infraset as literal env.Routing pod startup log confirms config loaded:
Image deployed:
gitea.d-ma.be/mathias/routing:5950ef5f0fef7a38bc29638a4514fd5b1efa4df4.All acceptance criteria met. Remaining concern —
GITHUB_PATpersistence insecrets.enc.yamlfor SOPS round-trip / rebuild survival — tracked separately in #14 (Item 2).