Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace BuildBot Functionality / Bootstrap GoReleaser #10443

Closed
Tracked by #10441
timflannagan opened this issue Jan 14, 2025 · 7 comments · Fixed by #10459
Closed
Tracked by #10441

Replace BuildBot Functionality / Bootstrap GoReleaser #10443

timflannagan opened this issue Jan 14, 2025 · 7 comments · Fixed by #10459
Assignees

Comments

@timflannagan
Copy link
Member

timflannagan commented Jan 14, 2025

Goal: POC whether goreleaser can be used to replace the release-related functionality that buildbot previously supported.

  • Initialize GoReleaser configuration for the KGateway project.
  • Configure multi-architecture builds for our Go binaries.
  • Ensure the built container images are correctly tagged and ready for publishing.
  • Note: we can potentially do this in a fork first to verify any blockers for adoption within this repo.

Ref:

@timflannagan
Copy link
Member Author

timflannagan commented Jan 14, 2025

I'm playing around with integrating this in my fork. So far, I haven't run into any obvious snags and I have multi-arch image publishing to https://hub.docker.com/repository/docker/tflannag/k8sgateway/general and releases working. See https://github.com/timflannagan/k8sgateway/tree/poc/goreleaser for the full set of changes.

I added a release Makefile command and I've been testing publishing via make release GORELEASER_ARGS="--clean --skip=announce,validate" IMAGE_REGISTRY=docker.io/tflannag IMAGE_REPO=k8sgateway. As an aside, we really need to overhaul the Makefile targets as well as long as renaming the repository.

@timflannagan
Copy link
Member Author

Using GHCR instead of dockerhub seems to work without any issues as well:

$ docker run ghcr.io/timflannagan/k8sgateway:1.0.1-dev                                                                                                                                                                                      125 ↵
Unable to find image 'ghcr.io/timflannagan/k8sgateway:1.0.1-dev' locally
1.0.1-dev: Pulling from timflannagan/k8sgateway
Digest: sha256:464d63f97c867ac627616510500ea7a93c91e966e6993db831490f4351a548c1
Status: Downloaded newer image for ghcr.io/timflannagan/k8sgateway:1.0.1-dev
{"level":"info","ts":"2025-01-14T00:36:18.238Z","caller":"probes/probes.go:57","msg":"probe server starting at :8765 listening for /healthz"}
{"level":"error","ts":"2025-01-14T00:36:18Z","logger":"gloo.controller-runtime.client.config","msg":"unable to load in-cluster config","version":"1.0.1-dev","error":"unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined","stacktrace":"sigs.k8s.io/controller-runtime/pkg/client/config.loadConfig.func1\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:133\nsigs.k8s.io/controller-runtime/pkg/client/config.loadConfig\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:155\nsigs.k8s.io/controller-runtime/pkg/client/config.GetConfigWithContext\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:97\nsigs.k8s.io/controller-runtime/pkg/client/config.GetConfig\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:77\nsigs.k8s.io/controller-runtime/pkg/client/config.GetConfigOrDie\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:175\ngithub.com/solo-io/gloo/projects/gateway2/setup.StartGGv2\n\t/work/k8sgateway/projects/gateway2/setup/ggv2setup.go:69\ngithub.com/solo-io/gloo/projects/gloo/pkg/setup.startSetupLoop\n\t/work/k8sgateway/projects/gloo/pkg/setup/setup.go:22\ngithub.com/solo-io/gloo/projects/gloo/pkg/setup.Main\n\t/work/k8sgateway/projects/gloo/pkg/setup/setup.go:18\nmain.main\n\t/work/k8sgateway/projects/gloo/cmd/main.go:17\nruntime.main\n\t/home/timflannagan/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.3.linux-arm64/src/runtime/proc.go:272"}
{"level":"error","ts":"2025-01-14T00:36:18Z","logger":"gloo.controller-runtime.client.config","msg":"unable to get kubeconfig","version":"1.0.1-dev","error":"invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable","errorCauses":[{"error":"no configuration has been provided, try setting KUBERNETES_MASTER environment variable"}],"stacktrace":"sigs.k8s.io/controller-runtime/pkg/client/config.GetConfigOrDie\n\t/home/timflannagan/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.1/pkg/client/config/config.go:177\ngithub.com/solo-io/gloo/projects/gateway2/setup.StartGGv2\n\t/work/k8sgateway/projects/gateway2/setup/ggv2setup.go:69\ngithub.com/solo-io/gloo/projects/gloo/pkg/setup.startSetupLoop\n\t/work/k8sgateway/projects/gloo/pkg/setup/setup.go:22\ngithub.com/solo-io/gloo/projects/gloo/pkg/setup.Main\n\t/work/k8sgateway/projects/gloo/pkg/setup/setup.go:18\nmain.main\n\t/work/k8sgateway/projects/gloo/cmd/main.go:17\nruntime.main\n\t/home/timflannagan/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.3.linux-arm64/src/runtime/proc.go:272"}

Used the make release GORELEASER_ARGS="--clean --skip=announce,validate" IMAGE_REGISTRY=ghcr.io/timflannagan IMAGE_REPO=k8sgateway command.

@lgadban
Copy link
Contributor

lgadban commented Jan 14, 2025

Can we enumerate the features etc. that we used previously from buildbot?
IMO this will make it easier to understand the tradeoffs of moving away from buildbot

@lgadban lgadban moved this from Backlog to Planned in Kgateway Planning Jan 14, 2025
@lgadban lgadban added this to the kgw OSS initial cut milestone Jan 14, 2025
@timflannagan
Copy link
Member Author

@lgadban I'll add a TODO to audit the current cloudbuilder config for the release-related items. I'd be shocked if this tool doesn't support all it's relevant use cases and meets our needs going forward.

@timflannagan
Copy link
Member Author

Goreleaser supports disabling the changelog generation functionality: https://goreleaser.com/customization/changelog/. This is related to #10422, which proposes a new way to manage changelogs / release notes going forward and won't conflict with goreleasers' own functionality.

@lgadban
Copy link
Contributor

lgadban commented Jan 14, 2025

what would dev releases look like?
what would weekly releases look like?

@timflannagan
Copy link
Member Author

Just sketching out what I think we could do for the release workflow:

  • event triggers: workflow_dispatch, PRs to main, and tags
    • for PRs to main, we run a subset of the pipeline to make sure it doesn't silently break over time
    • open question on nightlies. there's definitely some appetite for nightly or weekly builds, but this is a free GH org and there was some concern we'd blast through our actions budget
  • dedicated job for building the helm chart and publishing to GHCR
  • dedicated job for running goreleaser

We can update the goreleaser config to add a header or footer for how to find the helm charts:

## Install

Helm charts can be found at <...>.

...

## Changelog

<TBD>

@lgadban lgadban moved this from Planned to In progress in Kgateway Planning Jan 15, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Kgateway Planning Jan 17, 2025
timflannagan added a commit to timflannagan/kgateway that referenced this issue Jan 21, 2025
This commit is a follow-up to kgateway-dev#10443 and kgateway-dev#10470 and migrates
away from the quay.io/solo-io container image registry in
favor of the ghcr.io repository in the project.

Additional work around renaming the gloo component, binaries, etc.
will be handled once we're closing the finish line with the

Signed-off-by: timflannagan <timflannagan@gmail.com>
tiberiuac pushed a commit to openet/gloo that referenced this issue Feb 13, 2025
Co-authored-by: Sam Heilbron <SamHeilbron@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants