GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(deploy): synchronize production GHCR pull auth by devantler · Pull Request #2625 · devantler-tech/platform Conversation
|
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
✅ Action performedReview finished.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
📝 WalkthroughWalkthroughThe change adds a Git/SOPS-based GHCR credential bridge that validates registry access, updates Flux and consumer secrets, synchronizes Talos registry authentication, and supports incomplete bootstrap states. Production and DR workflows now stage, verify, and reassert credentials around publishing, reconciliation, cluster updates, and restoration. KSail lifecycle commands use the pull-auth wrapper, while CI tests and documentation cover the new sequencing. Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@codex review for secret handling, fail-closed behavior, and GitHub Actions ordering |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c5922e573
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@codex review for secret handling, pre-publish fail-closed ordering, and shared package authorization |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Review Summary
Testing / Checks
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@codex review for GHCR auth protocol correctness, secret safety, fail-closed behavior, and deploy/DR ordering |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 06c5e81e4f
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@codex review for final-auth gating, GHCR secret safety, and deploy/DR ordering |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Current head |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e96c32e84
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
✅ Action performedReview finished.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: b70d68842d
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@codex review for GHCR transaction ordering, failure atomicity, and fresh-DR behavior |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dd1eec0eb
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…uth (#2635) * fix(deploy): reboot stale nodes so containerd adopts refreshed GHCR auth #2625 synchronizes Talos registry auth with --mode=no-reboot and then proves the node with `talosctl image pull`. Both halves miss the running containerd, so the sync certifies nodes that still cannot pull. containerd reads registry auth from its STATIC config (plugins.'io.containerd.cri.v1.images'.registry.configs.'ghcr.io'.auth), loaded ONCE at process start. Talos re-renders /etc/cri/conf.d/01-registries.part on a config change but does not restart containerd, and refuses to let anything else do it either: $ talosctl service cri restart error: service "cri" doesn't support restart operation via API So a --mode=no-reboot patch leaves the new credential on disk, correct and inert, while the running containerd keeps presenting the revoked one. The `image pull` gate cannot catch that: it goes through the TALOS image API, which builds auth from the machine config just written, not from containerd's CRI plugin. It passes on a node whose kubelet pulls are failing 403 — which is what happened on prod (2026-07-14): all 10 nodes carried ghcr-pull-verified-revision while every ksail-operator pod sat in ImagePullBackOff and the operator stayed four releases behind for over a day. Observed, and why it stayed silent: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?...&service=ghcr.io: 403 Forbidden A revoked credential is worse than none — ghcr.io answers bad basic-auth with 403 DENIED instead of falling back to anonymous, so public packages break too. But cached images are never re-pulled, so workloads stayed up and only upgrades failed; Helm then rolled back, leaving the HelmRelease Ready at the old version and its parent Kustomization healthy, so nothing alerted. - refresh-flux-ghcr-auth.sh: reboot each stale node after applying auth and wait for it to return Ready before touching the next (targets are already sorted workers-first and processed serially, so etcd keeps quorum). Record the verified-revision marker only afterwards, so it means "containerd has provably loaded this credential". Already-verified nodes are still skipped, so a reboot only happens on an actual rotation. - alert.yaml: watch HelmRelease directly. A rolled-back release is legitimately Ready, so the parent-Kustomization gate can never see this class. - authenticate-ghcr-pulls.yaml: document the reboot requirement (comments only). Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerting): watch every HelmRelease namespace; drain + quorum-gate the reboots Addresses the Codex review on this PR. Three of the four findings were real. P1 — the HelmRelease alert watched almost nothing. notification-controller has NO namespace wildcard: it defaults an omitted eventSources[].namespace to the Alert's own namespace, then matches on strict equality (internal/server/event_handlers.go): if source.Namespace == "" { source.Namespace = alert.Namespace } if event.InvolvedObject.Namespace != source.Namespace || ... { return false } `name: "*"` wildcards NAMES only. So the bare HelmRelease source I added watched only flux-system — 2 of the 45 HelmReleases — and would have missed ksail-operator, the one that caused the outage it was written for. Enumerate all 31 namespaces holding a HelmRelease. Enumeration drifts, and a silently-uncovered namespace is precisely the bug the alert exists to catch, so scripts/validate-alert-coverage.sh renders the overlays and fails CI when a HelmRelease appears in an unwatched namespace (fails closed if the overlays don't build). Verified: removing ksail-operator from the list fails the guard. P2 — reboots did not drain. `talosctl reboot` only cordons + evicts under PDB control with --drain; without it the node's pods are killed with it. Added. P2 — a control-plane reboot could drop etcd quorum. The roll is serial and control planes sort last, but a control plane already unhealthy before the run makes ours the second one down. Preflight every OTHER control plane's Ready condition and refuse otherwise. P2 (fresh-node reboots) — NOT taken, deliberately. Skipping the reboot when a node already carries the current ghcr-pull-desired-revision looks right but is unsafe: that marker tracks MACHINE CONFIG state, and machine-config state being decoupled from what containerd loaded IS this bug. The deploy runs this bridge twice — before AND after `ksail cluster update` (deploy-prod) — and cluster update stamps the current marker onto nodes whose containerd still holds the old credential; the manual runbook path can do the same. Skipping on that evidence would silently re-create the outage. An over-eager reboot costs ~90s on a drained node; a skipped one cost a day of ImagePullBackOff. Proving a node fresh needs evidence about containerd (start time vs when the credential landed), not the machine config — filed separately. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(scripts): fail closed on unreadable cordon state and partial alert-coverage render Two Codex fail-closed findings on #2635: - refresh-flux-ghcr-auth.sh: node_is_cordoned swallowed a transient `kubectl get node` failure into an empty string, reading as "not cordoned" — so the post-reboot uncordon could silently make a deliberately-cordoned node schedulable. It now returns a distinct code (2) on an unreadable state and the reboot loop aborts rather than rolling a node whose cordon it cannot preserve. - validate-alert-coverage.sh: `kubectl kustomize ... || true` let the coverage check pass on a partial render — a broken layer's namespaces silently drop out of the declared set and are never compared against the Alert. It now surfaces the render error and exits non-zero. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(deploy): harden GHCR auth reboot safety * fix(platform): close GHCR recovery safety gaps * fix(deploy): drain nodes through validated kube context * fix(deploy): make drain ownership atomic * fix(deploy): close GHCR rollout safety gaps * fix(deploy): tighten rollout safety validation * fix(deploy): close GHCR rollout safety gaps * fix(deploy): revalidate node before proof marker * refactor(test): remove Python harness additions * refactor(test): replace Python rollout harnesses with Go * fix: address GHCR rollout review findings * fix: retry transient runtime probe admission * fix(deploy): bootstrap stale runtimes safely * fix: exclude tainted peers from runtime capacity * fix(auth): wait for transient node lifecycle taints * fix(deploy): close bootstrap scheduling races * fix(scripts): claim cordon before Talos patch, gate bootstrap on auth evidence, preserve cordon recovery records (codex/CR review) - Claim cordon ownership BEFORE the reboot-mode machineconfig patch and release it when the patch or the pre-drain quorum check fails, so a concurrent roll cannot overwrite a freshly written node credential. - Only registry auth-denial evidence in the probe's waiting message may opt a roll into the warm-spare bootstrap; a transient outage stays a plain fail-closed refusal (both directions tested). - Externalize un-restored bridge-owned cordon recovery records to a ksail-operator ConfigMap before the work dir is deleted. - Checked type assertions in the node-inventory fake; assert the injected admission timeout is actually exercised. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(deploy): fence GHCR credential rollouts * fix(deploy): initialize optional recovery state * chore: Apply megalinter fixes * test(ghcr-auth): run the fake commands uninstrumented The fakes are the test binary re-executed under another name, and the script under test calls them hundreds of times per case, so every build flag on the test binary is charged per invocation. Under the coverage workflow's -race -coverprofile -covermode=atomic that measured 39.48s for a case that takes 1.23s plain — a 32x multiplier, which put the package roughly ten times past Go's 10m default and took 📊 Code Coverage red. The fakes parse arguments and write files, and the package reports coverage: [no statements] because what it covers is a shell script, so the instrumentation bought nothing. They now run from an uninstrumented copy built once per run; the tests keep whatever flags they were invoked with. Without a Go toolchain the fakes fall back to the test binary, which is correct but slow. A coverage run also exports GOCOVERDIR, and an uninstrumented process inheriting it writes a runtime warning to stderr that the tests read as output, so the child environment drops it. Full suite under the coverage workflow's own flags: 5950s projected -> 188.98s, against a 186.28s plain baseline. 115 tests, all passing, no coverage warnings. Fixes #2811 * fix(notifications): watch the doggy-countdown namespace for reconcile failures The new doggy-countdown tenant has its own Kustomization in its own namespace, and the reconciliation Alert did not list it. Because notification-controller has no namespace wildcard, a Kustomization there could fail, roll back and report Ready with nothing paging. Found by this branch's own coverage guard on its first contact with main. --------- Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: devantler <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Refresh Talos GHCR auth from Git/SOPS pull credential Refresh root Flux GHCR auth before reconciliation
There was an error while loading. Please reload this page.