Skip to content

Package as Helm, publish images to ghcr.io - #2

Merged
lllamnyp merged 4 commits into
mainfrom
feat/helm-packaging
Jul 23, 2026
Merged

Package as Helm, publish images to ghcr.io#2
lllamnyp merged 4 commits into
mainfrom
feat/helm-packaging

Conversation

@lllamnyp

Copy link
Copy Markdown
Owner

Replaces the kubebuilder kustomize tree with Helm packaging and wires up image publishing to ghcr.io.

What changed

  • config/ is gone; the deployable artifact is chart/address-controller. The chart follows the cozyplane layout: hand-written Deployment / ServiceAccount / ClusterRoleBinding templates plus values for image, replicas, leader election, metrics, and resources.
  • Generated manifests live inside the chart and stay tool-owned. make manifests runs controller-gen with output redirected into the chart: the three CRDs land in chart/address-controller/crds/, the ClusterRole in templates/role.yaml. Neither is ever hand-edited.
  • CRD lifecycle is deliberate. Helm installs crds/ on first install but never upgrades or deletes it — so helm uninstall cannot take the IPAddress ledger down with it. CRD upgrades go through make install-crds (plain kubectl apply of the generated files).
  • Leader election is on by default in the chart (controller.leaderElect), backed by a new leases RBAC marker on main() so the generated role covers what the flag needs — replacing kustomize's static leader-election Role.
  • Image publishing: the Dockerfile cross-compiles on the native build platform (golang:1.26, CGO_ENABLED=0, per-target GOARCH) onto distroless/static:nonroot. A release workflow pushes ghcr.io/lllamnyp/address-controller as :main + :main-<sha> on pushes to main and semver tags on v* tags; make docker-build docker-push does the same locally with a git-describe tag. The image is already published (:main, single-arch amd64 from the local build; CI takes over multi-arch on merge).
  • The scaffolded e2e suite and its workflow went with the kustomize tree they deployed through; samples moved to examples/.

Not carried over from cozyplane (deliberately)

  • Digest-pinned base images / reproducible-build knobs (SOURCE_DATE_EPOCH, rewrite-timestamp, -buildvcs=false) — that's cozyplane's digest-pin loop; nothing here consumes image digests yet.
  • A separate chart repo / OCI chart publishing — make helm-package stamps and packages into dist/; publishing can follow when there's a consumer.

🤖 Generated with Claude Code

lllamnyp added 2 commits July 21, 2026 00:07
The kubebuilder config/ kustomize manifests are gone; the deployable
artifact is now chart/address-controller. The chart's CRDs
(chart/address-controller/crds/) and ClusterRole (templates/role.yaml)
are controller-gen output written directly into the chart by 'make
manifests' — generated, never hand-edited. The deployment, RBAC binding,
and service account are hand-written templates in the cozyplane style.

Helm's crds/ directory is installed on first install but never upgraded
or deleted by Helm: CRD upgrades go through 'make install-crds', and
uninstalling the chart deliberately leaves the IPAddress ledger behind.

A leases RBAC marker on main() covers leader election, replacing the
static kustomize leader-election Role. The scaffolded e2e suite went
with the kustomize tree it deployed through; samples moved to examples/.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
The Dockerfile cross-compiles on the native build platform (GOARCH per
target, no QEMU for the toolchain) on golang:1.26 and ships the static
binary on distroless/static:nonroot. The release workflow publishes
ghcr.io/lllamnyp/address-controller as :main, :main-<sha>, and semver
tags on v* tags; 'make docker-build docker-push' does the same locally
with a git-describe tag.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
lllamnyp added 2 commits July 23, 2026 00:59
The AttachedTo printer column shows status.associatedTo.name — without
it the association, a load-bearing part of the address lifecycle, was
invisible except through -o yaml.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
@lllamnyp
lllamnyp marked this pull request as ready for review July 23, 2026 06:39
@lllamnyp
lllamnyp merged commit 8a89641 into main Jul 23, 2026
2 of 4 checks passed
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.

1 participant