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

Feature Request: Extract gotohelm & helmette into its own package #461

Open
lxfontes opened this issue Feb 28, 2025 · 2 comments
Open

Feature Request: Extract gotohelm & helmette into its own package #461

lxfontes opened this issue Feb 28, 2025 · 2 comments

Comments

@lxfontes
Copy link

The combo gotohelm & helmette is amazing for projects that have a distribution helm chart & an operator that installs said helm chart.

Would be nice to have it extracted in its own Go package & versioned in a way that is "go gettable".

We at @cosmonic volunteer to help in anything needed to get this going ❤

@chrisseto
Copy link
Contributor

I'm glad to hear that gotohelm has found users outside of us! We can certainly spin it out into it's own repository. I've been meaning to do so for a bit anyhow. It'll be a bit slow going but I think I can get to it within the month of March.

Is it usable in the current state? go run appears to work and you should be able to pull in the pkg module though it's certainly larger than would be ideal.

❯ go run github.com/redpanda-data/redpanda-operator/gotohelm@latest --help
go: downloading github.com/redpanda-data/redpanda-operator/gotohelm v0.0.0-20250307144522-a1de4a136983
go: downloading github.com/redpanda-data/redpanda-operator v2.1.1+incompatible
Usage of /var/folders/jy/5fvcqh9937d82pv9py94t4jc0000gp/T/go-build643222042/b001/exe/gotohelm:
  -write string
        The directory to write the transpiled templates to or - to write them to standard out (default "-")

As a step in the right direction, I could at least move all the code to sit under the gotohelm module?

If you all have any other feedback please drop it into this issue, there's certainly a lot of sharp edges right.

@lxfontes
Copy link
Author

lxfontes commented Mar 7, 2025

Thanks for the response.

You got it. The go run & go get for gotohelm itself is fine. The challenge is with the chart writing.

We end up with go.mod looking like:

module github.com/cosmonic/charts/.....

go 1.24.0

require (
	github.com/redpanda-data/redpanda-operator/pkg v0.0.0-20250304223239-0c39aee1f91d    <-------
	k8s.io/api v0.32.2
	k8s.io/apimachinery v0.32.2
	k8s.io/client-go v0.32.2
	k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
)

It's likely related to git tags / versioning as go modules expect tags in a certain way.

 ❯ go list -m -versions github.com/redpanda-data/redpanda-operator
github.com/redpanda-data/redpanda-operator v2.0.0+incompatible v2.1.0+incompatible v2.1.1+incompatible v2.1.2-23.2.17+incompatible v2.1.3-23.2.17+incompatible v2.1.4-23.2.17+incompatible v2.1.5-23.2.17+incompatible v2.1.6-23.2.17+incompatible v2.1.7-23.2.17+incompatible v2.1.8-23.2.17+incompatible v2.1.9-23.2.17+incompatible v2.1.10-23.2.18+incompatible v2.1.11-23.3.1+incompatible v2.1.12-23.3.3+incompatible v2.1.13-23.3.4+incompatible v2.1.14-23.3.4+incompatible v2.1.15-23.3.7+incompatible v2.1.16-23.3.11+incompatible v2.1.17-23.3.11+incompatible v2.1.18-23.3.13+incompatible v2.1.19-24.1.2+incompatible v2.1.20-24.1.2+incompatible v2.1.21-24.1.2+incompatible v2.1.22-24.1.7+incompatible v2.1.23-24.1.7+incompatible v2.1.24-24.1.8+incompatible v2.1.25-24.1.9+incompatible v2.1.26-24.1.9+incompatible v2.1.27-24.1.11+incompatible v2.1.28-24.2.1+incompatible v2.1.29-24.2.1+incompatible v2.1.29-24.2.2+incompatible v2.2.0-24.2.2+incompatible v2.2.1-24.2.3+incompatible v2.2.2-24.2.4+incompatible v2.2.3-24.2.4+incompatible v2.2.4-24.2.5+incompatible v2.2.5-24.2.7+incompatible v2.3.0-24.2.10+incompatible v2.3.0-24.3.0+incompatible v2.3.0-24.3.1+incompatible v2.3.1-24.3.1+incompatible v2.3.2-24.3.1+incompatible v2.3.3-24.3.1+incompatible v2.3.4-24.3.2+incompatible v2.3.5-24.3.2+incompatible v2.3.6-24.3.3+incompatible v2.3.7-24.3.6+incompatible v2.3.8-24.3.6+incompatible

versus something like

 ❯ go list -m -versions go.wasmcloud.dev/component
go.wasmcloud.dev/component v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5

Having gotohelm in its own module would allow the existing top-level versioning to continue while giving gotohelm its own versions 👍

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

No branches or pull requests

2 participants