Skip to content

ci: publish the vpc-controller image and kustomize bundle - #7

Merged
scotwells merged 1 commit into
mainfrom
ci/publish-container-image
Aug 21, 2026
Merged

ci: publish the vpc-controller image and kustomize bundle#7
scotwells merged 1 commit into
mainfrom
ci/publish-container-image

Conversation

@scotwells

Copy link
Copy Markdown
Collaborator

The VPC controller merged in #6 with a binary and deployment manifests but no way to ship them. This adds the same publishing pipeline the sibling operators use: on every push and release it validates the kustomizations, builds and pushes ghcr.io/datum-cloud/vpc-controller (amd64 + arm64), then pushes config/ as an OCI kustomize bundle at ghcr.io/datum-cloud/vpc-controller-kustomize with the image pinned to the same tag. Tags are date-stamped, e.g. v0.0.0-main-20260820-143512. Flux consumes the bundle via OCIRepository and points a Kustomization at config/default.

Two manifest changes come with it. --attachment-mode is required and has no default, so it now reads from an ATTACHMENT_MODE environment variable (default Hypervisor, correct for Unikraft cells) — a cell overlay patches one env value instead of rewriting an args list by index. And readiness is gated on the webhook server having started, rather than a bare ping.

Deployment hazard, first apply on a live cell. The MutatingWebhookConfiguration ships failurePolicy: Fail for Pods labelled networking.datumapis.com/inject-interfaces: "true". While the controller is not serving, creation of every Pod carrying that label fails. The readiness gate keeps the webhook Service endpoint-less until the controller can actually admit, which turns the failure into a clean connection refusal rather than a silently unattached Pod, but it does not remove the window. cert-manager must be present before this is applied: it issues the serving cert and injects the CA via cert-manager.io/inject-ca-from. If the webhook-server-cert secret is missing the manager Pod sits in ContainerCreating and the window stays open. On first apply, watch that Certificate serving-cert goes Ready and that the vpc-controller-webhook Service has an endpoint before any labelled workload is scheduled; a Flux health check on the Deployment is the cheapest way to hold the rollout there.

Verified: task build, task test:unit, golangci-lint, yamlfmt -lint, kustomize build on every kustomization directory, and a local replay of the CI image stamping (kustomize edit set image in config/manager) producing the pinned reference in config/default. Not verified: the workflow itself, which cannot run until this is on a branch in CI — including the GHCR push, the bundle artifact and the release-tag path.

🤖 Generated with Claude Code

The repo had no publishing pipeline, so the controller added in #6 could not
be deployed anywhere. Add the sibling-standard publish workflow (validate
kustomize, build/push the container image, then push the config tree as an OCI
kustomize bundle with the image pinned to the same tag).

Make the manifests safe to apply in one shot against a live cell: readiness is
now gated on the webhook server having started, so the webhook Service takes no
endpoint until the controller can admit Pods. The required --attachment-mode
moves to an ATTACHMENT_MODE environment variable so an overlay can retarget a
cell without rewriting the args list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells requested a review from privateip August 21, 2026 02:33
@scotwells
scotwells marked this pull request as ready for review August 21, 2026 02:33
@scotwells
scotwells requested a review from a team as a code owner August 21, 2026 02:33
@scotwells
scotwells merged commit aa378fd into main Aug 21, 2026
8 checks passed
@scotwells
scotwells deleted the ci/publish-container-image branch August 21, 2026 02:35
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