GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(deploy): synchronize production GHCR pull auth by devantler · Pull Request #2625 · devantler-tech/platform

Conversation

@devantler

@devantler devantler commented Jul 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

🤖 Generated by the Codex Daily AI Engineer instance.

Summary

  • make the Git/SOPS Docker config authoritative for every production pull path: root Flux, tenant workloads, Kyverno verification, and Talos hosts
  • fail closed unless the credential performs real registry reads for all seven exact private targets
  • synchronize stale Talos nodes workers-first with RegistryAuthConfig → exact image pull → verified revision, then synchronize and verify the Kubernetes/OpenBao fan-out
  • keep the Actions GHCR_TOKEN only for publication/signing while constrained KSail lifecycle commands use the SOPS pull credential
  • carry a non-secret SOPS-ciphertext revision through Talos machine config so token-only rotations refresh future Cluster Autoscaler templates
  • preserve explicit DR bootstrap handling, add regression/CI coverage, and update every production recovery path

Root cause

There were two related credential paths with different failure modes.

First, the deploy pushed and reconciled before refreshing root Flux pull auth. flux-system/ksail-registry-credentials is KSail-managed and remained stale; KSail redacts credential-only changes from its structural diff (devantler-tech/ksail#6107). The root OCIRepository therefore returned GHCR DENIED, blocking the artifact containing the updated SOPS seed and deadlocking variables-base → PushSecret → OpenBao → ExternalSecret.

Second, Talos host registry auth and ksail.prod.yaml still consumed the separate Actions GHCR_TOKEN. That publication token was denied for private KSail pulls on a newly autoscaled node, producing GHCR HTTP 403 and ImagePullBackOff for the uncached operator image. A pod imagePullSecret cannot repair this path because Talos performs first-party signature/artifact resolution with host registry auth. Credential redaction also meant a later token-only rotation would not refresh the autoscaler machine template without a visible revision input.

Fix

scripts/run-ksail-prod-with-pull-auth.sh now constrains production KSail commands and derives lifecycle username/token from stringData.ghcr_dockerconfigjson. workload push deliberately preserves the separate Actions actor/write token. A SHA-256 of the committed SOPS ciphertext—not decrypted auth—is passed as the desired Talos/autoscaler revision.

Before Kubernetes credential mutation, scripts/refresh-flux-ghcr-auth.sh validates every exact private package. It lists every Kubernetes Node, rejects empty/ambiguous/duplicate InternalIPs, skips nodes already verified at the current ciphertext revision, and processes stale workers before control planes. Each stale node receives a file-backed Talos v1.13 RegistryAuthConfig patch in no-reboot mode, must pull the exact live KSail operator image (or the exact declared version during DR bootstrap), and only then receives a separate verified-revision annotation. Talos output is captured in mode-0600 temporary files so a failing command cannot echo the credential into Actions logs.

The existing bridge then stages variables-base, force-syncs the PushSecret and all three ExternalSecrets, canonical-compares every materialized Docker config with Git/SOPS, and finally merge-patches root Flux auth. Normal mode fails closed on partial fan-out; explicit DR bootstrap mode repairs root auth before ESO exists and requires a full verification pass after Flux converges. Both production jobs install the pinned Talos CLI before the first mutating bridge.

Safety

  • only the encrypted Docker-config scalar is hashed; plaintext input is rejected
  • decrypted auth, Basic/Bearer material, registry responses, Talos output, and Kubernetes patches stay in mode-restricted temporary files
  • no plaintext token or derived base64 enters argv or normal logs; shell tracing is disabled
  • a token-exchange HTTP 200 is insufficient: every package must pass an authenticated manifest GET
  • desired machine-template state is distinct from post-pull verified node state, so a fresh node cannot falsely claim proof
  • updates are serial, workers-first, no-reboot, and stop on the first failed auth, pull, or revision write

Validation

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/tests -p 'test_*.py' — 66 passed
  • regressions cover SOPS/auth variants, ciphertext rotation, arbitrary-command rejection, secret-output suppression, exact package/image binding, DR without an operator Deployment, desired-vs-verified state, current-node Talos skip, workers-first ordering, malformed node inventory, and stop-on-first-failure
  • Bash syntax + ShellCheck, Actionlint, composite/workflow YAML parse, naming, embedded JSON, and zizmor — passed/no findings
  • Talos v1.13.5 render + talosctl validate — prod/cloud and local/container control-plane + worker configs passed
  • ksail workload validate and ksail --config ksail.prod.yaml workload validate — 109 kustomizations / 541 YAML files each
  • 44/44 Python functions carry docstrings
  • live ./scripts/refresh-flux-ghcr-auth.sh --check-only — all seven exact private package reads passed

Live recovery evidence

The full bridge completed successfully against production. All nine Talos nodes accepted the Git/SOPS host auth, proved the exact private KSail image pull, and now carry the current verified revision. The KSail operator rollout is healthy, all six OCIRepositories report Ready=True, and no pod is in ErrImagePull or ImagePullBackOff.

Separate follow-up

Review also exposed a pre-existing supply-chain defect: root Cosign configuration is misnested, live root verification is null, and DR publishes unsigned. Atomic verified publication plus the coordinated DR signer correction remains isolated in #2627.

Fixes #2624
Fixes #2628
Part of #2613

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@devantler
fix(deploy): refresh Flux GHCR auth before reconcile
1c5922e
@github-project-automation github-project-automation Bot added this to 🌊 Project Board Jul 13, 2026
@github-project-automation github-project-automation Bot moved this to 🫴 Ready in 🌊 Project Board Jul 13, 2026
@devantler devantler mentioned this pull request Jul 13, 2026
Single source of truth for the ghcr pull credential (OpenBao + ExternalSecret) #2613
Open
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

@coderabbitai review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@devantler I'll review the changes now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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

  • Make root OCI publication verified and atomic before moving latest #2627 — Both changes update production and DR OCI publication sequencing with artifact verification before Flux consumes latest.

Possibly related PRs

  • devantler-tech/platform#2332 — Adds the provider-upjet-unifi wiring whose private image reference is explicitly covered by the new GHCR preflight tests.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address #2624 and #2628 by refreshing root Flux auth, reasserting after updates, and deriving Talos auth from Git/SOPS.
Out of Scope Changes check ✅ Passed No clearly unrelated code changes stand out; the edits stay within deploy, credential bridge, Talos, CI, and documentation scope.
Docstring Coverage ✅ Passed Docstring coverage is 98.15% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title succinctly describes the main deploy change: synchronizing production GHCR pull authentication.
Description check ✅ Passed The description clearly matches the PR's GHCR auth synchronization, Talos, DR, and CI updates.

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance. CodeRabbit explicitly rate-limited the primary review request for 58 minutes, so this is the documented fallback lane.

@codex review for secret handling, fail-closed behavior, and GitHub Actions ordering

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c5922e573

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/actions/deploy-prod/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devantler
fix(deploy): harden GHCR credential preflight
43c6694
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance. CodeRabbit remains in its recorded cooldown, so Codex is the single current-head review lane after commit 43c6694 addressed all three prior P2 findings.

@codex review for secret handling, pre-publish fail-closed ordering, and shared package authorization

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Summary

  • I reviewed the current PR head (43c6694) for the requested areas: secret handling, pre-publish fail-closed ordering, and shared package authorization.
  • I did not find a new concrete issue requiring a follow-up code change, so I did not create a commit or PR.
  • Secret handling looks appropriately constrained: the helper decrypts only stringData.ghcr_dockerconfigjson into a mode-restricted temp file, avoids putting plaintext/base64 payloads in argv/logs, validates Docker auth shape, and removes temp material through the trap. scripts/refresh-flux-ghcr-auth.shL32-L49 scripts/refresh-flux-ghcr-auth.shL51-L69 scripts/refresh-flux-ghcr-auth.shL123-L138
  • The auth-only Docker config path is now accepted while malformed auth still fails closed via the jq validation and regression tests. scripts/refresh-flux-ghcr-auth.shL51-L83 scripts/tests/test_refresh_flux_ghcr_auth.pyL207-L216 scripts/tests/test_refresh_flux_ghcr_auth.pyL225-L238
  • The deploy action now validates the SOPS pull credential before workload push, then reasserts it after publish and before reconcile, which closes the mutable latest preflight gap called out in the earlier review. .github/actions/deploy-prod/action.ymlL129-L150 .github/actions/deploy-prod/action.ymlL295-L310
  • The final post-cluster update reassertion is retained and guarded by the successful preflight, preserving the “repair KSail-managed root auth after possible rewrite” behavior. .github/actions/deploy-prod/action.ymlL341-L349
  • Shared credential package authorization now covers Platform plus both private tenant packages before mutation, and the tests assert the expected scope list and fail-closed tenant-denial behavior. scripts/refresh-flux-ghcr-auth.shL26-L30 scripts/refresh-flux-ghcr-auth.shL86-L108 scripts/tests/test_refresh_flux_ghcr_auth.pyL198-L205 scripts/tests/test_refresh_flux_ghcr_auth.pyL246-L253

Testing / Checks

  • ✅ python3 -m unittest discover -s scripts/tests -p 'test_*.py'
  • ✅ bash -n scripts/refresh-flux-ghcr-auth.sh
  • ✅ python3 - <<'PY' ... deploy action ordering assertion ... PY
  • ✅ git status --short — clean after removing generated pycache and restoring the pre-existing tracked pyc file.

View task →

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devantler
fix(deploy): verify every GHCR pull consumer
06c5e81
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance. CodeRabbit remains in its recorded cooldown, so Codex is the single current-head review lane after the five-package registry-read and DR-ordering hardening at commit 06c5e81.

@codex review for GHCR auth protocol correctness, secret safety, fail-closed behavior, and deploy/DR ordering

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06c5e81e4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/actions/deploy-prod/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devantler
fix(deploy): gate final auth reassert
4e96c32
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance. CodeRabbit remains in its recorded cooldown, so Codex is the single current-head lane after commit 4e96c32 fixed the prior P1 and exact-head CI returned green.

@codex review for final-auth gating, GHCR secret safety, and deploy/DR ordering

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

Current head 4e96c32e still adds a new Python validator test, conflicting with #2623's no-first-party-Python acceptance criterion and the Go/Bash scripting direction established on #2622. A Bash replacement should preserve the updated five-package manifest reads and DR ordering, bind each fake bearer token to its requested repository scope, accept access_token, and fail closed on HTTP 200 without a token. I prepared and validated that port locally (11 cases plus Bash syntax, ShellCheck, and Actionlint), but held the push because this branch advanced twice during the work; please keep the next update fast-forward/collision-safe.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e96c32e84

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/actions/deploy-prod/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devantler
fix(deploy): synchronize GHCR pull consumers
b70d688
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

@coderabbitai review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@devantler I'll review the changes now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b70d68842d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devantler
fix(deploy): stage GHCR consumers before root auth
9dd1eec
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

@codex review for GHCR transaction ordering, failure atomicity, and fresh-DR behavior

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 13, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dd1eec0eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/actions/deploy-prod/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread scripts/refresh-flux-ghcr-auth.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@devantler devantler mentioned this pull request Jul 13, 2026
Make root OCI publication verified and atomic before moving latest #2627
Closed
@devantler
fix(deploy): close GHCR credential race windows
00141e5
@devantler

devantler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Codex Daily AI Engineer instance.

@coderabbitai review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jul 14, 2026
fix(deploy): verify incoming image on Talos nodes #2633
Merged
Skip the GHCR-auth reboot for nodes whose containerd already booted with the current credential #2638
Open
Roadmap: replace the long-lived GitHub App private key with per-app, workload-identity-brokered short-lived tokens #2664
Open
Migrate remaining Python tooling and tests to Go #2623
Closed
chore(prod): verify the stable API endpoint during control-plane replacement #2764
Open
The EKS authorization surface hash goes stale on every HelmRelease dependency bump #2768
Closed
This was referenced Jul 25, 2026
bug(ci): EKS authorization validator fails on main, reddening every PR #2801
Closed
bug(ci): every secret rotation reds the EKS authorization gate with no authorization change #2803
Closed
refresh-flux-ghcr-auth suite exceeds Go's 10m default timeout on CI runners, reddening 📊 Code Coverage #2811
Closed
Adopt Flux v2.9 workload-identity auth to OpenBao for SOPS decryption, and decide on self-hosted signing #2831
Open
devantler added a commit that referenced this pull request Jul 28, 2026
@devantler @claude
fix(deploy): reboot stale nodes so containerd adopts refreshed GHCR a…
6e01189
…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]>
This was referenced Jul 28, 2026
Give the DR rebuild a signed-artifact publication path #2839
Closed
fix(ci): verify the KSail archive before installing it in the validate job #2841
Closed
Publish prod manifests through an immutable staging reference so latest never names unsigned bytes #2849
Closed
Harden the scan-count helper against CI drift it cannot currently detect #2853
Closed
Record a re-vendor-durable service-account-token verdict for the KubeVirt and CDI operator bundles #2861
Closed
fix(ci): resolve what a command actually executes before matching it in the publication-order guard #2873
Closed
Scope tenant GHCR pull credentials to authorized packages #2889
Open
roadmap: decide whether a registry layer (Harbor) earns its place in the supply chain #2894
Closed
Cosign verify is configured but not enforced: the deploy path never applies it to the live OCIRepository #2922
Closed
AGENTS.md ## Maintenance is several conventions out of date and silently misleads every agent that reads it #2925
Closed
fix(deploy): pre-handoff pod proof is sampled once, so a normal rollout evicts PRs from the merge queue #2926
Closed
feat(ci): verify published evidence before promoting the prod digest #2930
Merged
Root OCIRepository verification does not survive onto the live cluster #2938
Closed
This was referenced Aug 5, 2026
fix(ci): retry the cordon claim when an unrelated Node write breaks its CAS test #2977
Merged
The GHCR sync lease tells operators to prove a process dead, but ships no way to do it #3033
Closed
Reassert GHCR auth re-runs the whole fenced transaction (incl. a kustomize-controller restart) when it has nothing to change #3039
Closed
perf(ci): skip the Flux fence when the GHCR bridge has nothing to write #3041
Closed
Every prod deploy rolling-reboots the whole fleet: ksail cluster update invalidates the GHCR node proof #3042
Closed
security(ci): talosctl is installed with no integrity check on both production deploy paths #3076
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

released

Projects

🌊 Project Board
Archived in project

Milestone

No milestone

Development

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

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@devantler
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.