Repository navigation
fix(tts-audio): let the backfill reach the API server, and report when it cannot - #283
Merged
Merged
Conversation
…n it cannot
Three findings from inspecting the live cluster, in the order they blocked it.
**1. A NetworkPolicy blocked the backfill from the API server.** The egress rule
allowed `app.kubernetes.io/component=webhook`, but the backfill pod is labelled
`component=backfill`, so it authenticated to Ghost, listed all 221 posts, and
then failed to create a single Job:
failed for <slug>: connect ECONNREFUSED 10.43.0.1:443 (×221)
Select `component in (webhook, backfill)`. The worker is deliberately excluded
even though it shares `name=tts-audio`: it runs without a service-account token
and has no business reaching the API server, so widening to the shared label
would have granted it egress it does not need.
**2. The summary line lied.** That run ended with
{"result":"ok","scanned":221,"eligible":221,"created":0,"failed":221}
The exit code was already 1, so the pod failed correctly while the log claimed
success. `result` now reflects failures.
**3. The image is amd64-only in a mixed-architecture cluster.** Pods run on the
amd64 k3s worker, but the control-plane node is arm64 and only cordoned with an
`unschedulable` taint — uncordoning it would put a pod into ImagePullBackOff.
`ts-audio-ci.yaml` now publishes a multi-arch manifest. The local build stays
amd64 because `load: true` cannot take a multi-platform build and the smoke test
runs on the amd64 runner.
`createJob` is injectable so the "API server unreachable" path is tested; the new
test fails without fix 2.
ngeorger
approved these changes
Nov 27, 2026
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #282, which merged just before these three fixes landed. All found by inspecting the running cluster, not the code.
1. A NetworkPolicy blocked the backfill from the API server
The egress rule allowed
app.kubernetes.io/component=webhook, but the backfill pod is labelledcomponent=backfill. So it authenticated to Ghost, listed all 221 posts, and then created zero Jobs:Now selects
component in (webhook, backfill)— the two components that actually create Jobs.The worker stays excluded, even though it shares
name=tts-audio. It runs withautomountServiceAccountToken: falseand has no business reaching the API server; widening the selector to the shared label would have quietly granted it egress it doesn't need.2. The summary line lied
That run ended with:
{"result":"ok","scanned":221,"eligible":221,"created":0,"skipped":0,"ineligible":0,"failed":221}The exit code was already 1 — the pod failed correctly while the log claimed success.
resultnow reflects failures.createJobbecame injectable so the "API server unreachable" path is testable; the new test fails without this fix (verified by reverting it).3. The image is amd64-only in a mixed-architecture cluster
The cluster is k3s on two nodes:
noviembresre-1(amd64) andrpi(arm64, control plane, currently cordoned with anunschedulabletaint). Every pod runs on the amd64 node, which is consistent — but nothing constrains the architecture, so uncordoningrpiwould place a pod there and fail withImagePullBackOff.tts-audio-ci.yamlnow publisheslinux/amd64,linux/arm64(arm64 via QEMU). The local build stayslinux/amd64becauseload: truecannot take a multi-platform build and the smoke test runs on the amd64 runner.Gates
deploy/tts-audio/test.sh✅ 79 tests ·yarn verify✅Still open (infra, unchanged by this PR)
tts-audio-gatewaydoes not exist → the HTTPRoute has nostatusandtts-audio.sredevops.orgreturns Cloudflare 1016. The receiver has never received a webhook; no worker Job has ever been created.tts-sredevopsorg— a ranged seek would fail in the browser.