fix(node-image): give the bake its policy and credential in binjovi-builds #459

Merged
binjovi-bot merged 1 commit from fix/node-image-job-namespace into trunk 2026-09-08 13:49:31 +00:00
Owner

The ARM bake moved from an Argo Workflow in workflows to a native Job in
binjovi-builds. Its ServiceAccount exists in both namespaces, so that looked
fine. Two things did not move with it:

  • CiliumNetworkPolicy/binjovi-node-image-bake existed only in workflows.
    A pod carrying these labels with no policy in its namespace loses egress
    silently — the git fetch and the candidate push just hang.
  • ClusterSecretStore/binjovi-node-image-candidate-registry admitted only
    workflows
    , so the candidate dockerconfig ExternalSecret could not be
    created in binjovi-builds at all.

The first live bake caught the second one loudly:

MountVolume.SetUp failed for volume "docker-config":
secret "binjovi-hetzner-node-image-candidate-dockerconfig" not found

This is the dangling-reference class the migration plan already names — a
reference that resolves today may be scoped to a namespace being left behind.
Check the Secret, the ServiceAccount and the NetworkPolicy before repointing
a consumer.

The new policy grants strictly less

  • no kube-apiserver — the Job sets automountServiceAccountToken: false,
    so there is no token to use one with. Argo needed it for its executor sidecar.
  • no minio — the Argo pod archived its own logs. Binjovi reads a Job's
    logs through the API, so the pod never talks to object storage.

What is left is DNS, the Forgejo git fetch, and the zot candidate push.

Guard

It now pins the namespace set of these policies rather than "at least one",
because "at least one" is exactly what let this ship broken. Verified with a
negative control: deleting the binjovi-builds policy from a scratch copy fails
the check, and restoring it passes.

tests/check.sh green.

https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76

The ARM bake moved from an Argo Workflow in `workflows` to a native Job in `binjovi-builds`. Its ServiceAccount exists in both namespaces, so that looked fine. Two things did not move with it: * **`CiliumNetworkPolicy/binjovi-node-image-bake` existed only in `workflows`.** A pod carrying these labels with no policy in its namespace loses egress **silently** — the git fetch and the candidate push just hang. * **`ClusterSecretStore/binjovi-node-image-candidate-registry` admitted only `workflows`**, so the candidate dockerconfig ExternalSecret could not be created in `binjovi-builds` at all. The first live bake caught the second one loudly: ``` MountVolume.SetUp failed for volume "docker-config": secret "binjovi-hetzner-node-image-candidate-dockerconfig" not found ``` This is the dangling-reference class the migration plan already names — a reference that resolves today may be scoped to a namespace being left behind. Check the Secret, the ServiceAccount **and** the NetworkPolicy before repointing a consumer. ## The new policy grants strictly less * **no `kube-apiserver`** — the Job sets `automountServiceAccountToken: false`, so there is no token to use one with. Argo needed it for its executor sidecar. * **no `minio`** — the Argo pod archived its own logs. Binjovi reads a Job's logs through the API, so the pod never talks to object storage. What is left is DNS, the Forgejo git fetch, and the zot candidate push. ## Guard It now pins the namespace **set** of these policies rather than "at least one", because "at least one" is exactly what let this ship broken. Verified with a negative control: deleting the `binjovi-builds` policy from a scratch copy fails the check, and restoring it passes. `tests/check.sh` green. https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76
fix(node-image): give the bake its policy and credential in binjovi-builds
All checks were successful
binjovi/ci Binjovi completed the frozen plan
68cf651e06
The ARM bake moved from an Argo Workflow in ns workflows to a native Job in
ns binjovi-builds. Its ServiceAccount exists in both namespaces, so that
looked fine. Two things did not move with it:

  * CiliumNetworkPolicy binjovi-node-image-bake existed only in workflows.
    A pod carrying these labels with no policy in its namespace loses egress
    SILENTLY -- the git fetch and the candidate push just hang.
  * ClusterSecretStore binjovi-node-image-candidate-registry admitted only
    workflows, so the candidate dockerconfig ExternalSecret could not be
    created in binjovi-builds at all.

The first live bake caught the second one loudly:

  MountVolume.SetUp failed for volume "docker-config":
  secret "binjovi-hetzner-node-image-candidate-dockerconfig" not found

This is the dangling-reference class the migration plan already names: a
reference that resolves today may be owned by something being retired, or
scoped to a namespace being left behind. Check the Secret, the
ServiceAccount AND the NetworkPolicy before repointing a consumer.

The new policy grants strictly LESS than the Argo one:

  * no kube-apiserver -- the Job sets automountServiceAccountToken: false,
    so there is no token to use one with. Argo needed it for its executor.
  * no minio -- the Argo pod archived its own logs. Binjovi reads a Job's
    logs through the API, so the pod never talks to object storage.

What is left is DNS, the Forgejo git fetch and the zot candidate push.

The guard now pins the namespace SET of these policies rather than "at
least one", because "at least one" is exactly what let this ship broken.
Verified with a negative control: deleting the binjovi-builds policy from a
scratch copy fails the check.

Claude-Session: https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/seanfarm!459
No description provided.