Skip to content

New release process with ko and goreleaser - #331

Open
bwagner5 wants to merge 3 commits into
oxidecomputer:mainfrom
bwagner5:new-release-process
Open

bwagner5 wants to merge 3 commits into
oxidecomputer:mainfrom
bwagner5:new-release-process

Conversation

@bwagner5

@bwagner5 bwagner5 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description:

This PR changes the release process to use ko for container image building and goreleaser to manage building and releasing assets to github releases.
ko removes the release dependency on a container runtime since it can build images without a runtime. I kept the build helper to load into whatever runtime you are using for local dev. This makes the release process similar to CAPOx and Karpenter.

A lot of the changes shift responsibility from shell commands in the workflows to rely on goreleaser to do those things with the .goreleaser.yaml config.

A few differences:

  • There is no longer a VERSION file and instead we just use the tag. This reduces the steps to trigger a release to 1 tag push.
  • The plain K8s yaml manifest is no longer committed to the repo and instead is attached to the github release assets.
  • Upgraded from gcr.io/distroless/static-debian12:nonroot to 13 since 12 is deprecated.
  • The helm chart deployment template is updated to use args instead of a command path. ko places the binary in /ko-app/, which is also in the PATH, and sets the entrypoint to /ko-app/oxide-cloud-controller-manager. This means that old helm charts will not work after this PR merged with new images, but old images will work with new charts since the old image has an entrypoint of oxide-cloud-controller-manager. This is mostly a non-issue since most users will take helm + image as the full release asset.

Testing:

@bwagner5
bwagner5 requested a review from a team as a code owner November 20, 2026 22:24

@lgfa29 lgfa29 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I should really work on standardizing our release flows 🙃

Comment thread Makefile
Comment on lines +17 to +18
GORELEASER ?= go tool -modfile tools/go.mod goreleaser
KO ?= go tool -modfile tools/go.mod ko

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how useful it would be in this case, since we only seem to be using two tools for now, but in Terraform I don this:
https://github.com/oxidecomputer/terraform-provider-oxide/blob/8934dfd92115dadcbdaed5813c5d836c52e0e276/Makefile#L33

Comment thread .goreleaser.yaml

before:
hooks:
- make manifests VERSION={{ .Version }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine .Version is the tag, but I'm not sure where it's been set. Is it a "magical" value provided by goreleaser?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's magically provided by goreleaser. It's basically the tag without a "v" prefix. Different types of builds can produce a suffix like -SNAPSHOT, but all derived by tag unless overridden. There's a whole list of magical vars you can use for templating with goreleaser: https://goreleaser.com/customization/general/templates/

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