Skip to content

fix(tts-audio): let the backfill reach the API server, and report when it cannot - #283

Merged
ngeorger merged 1 commit into
mainfrom
fix/tts-audio-cluster-access
Nov 27, 2026
Merged

ngeorger merged 1 commit into
mainfrom
fix/tts-audio-cluster-access

Conversation

@sredevopsorgagents

Copy link
Copy Markdown
Collaborator

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 labelled component=backfill. So it authenticated to Ghost, listed all 221 posts, and then created zero Jobs:

failed for <slug>: connect ECONNREFUSED 10.43.0.1:443    (×221)

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 with automountServiceAccountToken: false and 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. result now reflects failures. createJob became 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) and rpi (arm64, control plane, currently cordoned with an unschedulable taint). Every pod runs on the amd64 node, which is consistent — but nothing constrains the architecture, so uncordoning rpi would place a pod there and fail with ImagePullBackOff.

tts-audio-ci.yaml now publishes linux/amd64,linux/arm64 (arm64 via QEMU). The local build stays linux/amd64 because load: true cannot 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-gateway does not exist → the HTTPRoute has no status and tts-audio.sredevops.org returns Cloudflare 1016. The receiver has never received a webhook; no worker Job has ever been created.
  • CORS is not configured on tts-sredevopsorg — a ranged seek would fail in the browser.

…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
ngeorger merged commit 772c4be into main Nov 27, 2026
6 checks passed
@ngeorger
ngeorger deleted the fix/tts-audio-cluster-access branch November 27, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants