garden-io / garden

Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching
https://garden.io
Mozilla Public License 2.0
3.29k stars 267 forks source link

[FEATURE]: publish helm charts using the `garden publish` command #5231

Open RiteshAryal opened 8 months ago

RiteshAryal commented 8 months ago

Feature Request

garden publsh has No publish handler available for module type helm

Background / Motivation

garden publish successfully publish built image to the target repo but the same command is not doing the same thing for helm module type.

The warning message at the end of the cli is as below

Done! :heavy_check_mark: ⚠ my-service → Publishing with tag 2.2.2 → ⚠ No publish handler available for module type helm

What should the user be able to do?

The dev or machine (pipeline) will be able to upload built Image to the target repository and at the same time it will also be uploading built helm-chart package (.tgz) to the target repo.

Why do they want to do this? What problem does it solve?

Will be convenient to perform both of this relevant task at the same time.

Suggested Implementation(s)

Please let the helm type module's config be set safely somewhere and the command garden publish <existing-usual-stuffs> --var targetHelmVer="x.x.x" --var targetHost="or-globally-config-somewhere"

Whichever way is easy, safe and convenient.

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful and a work around is there (either by using garden's script or task).

🌹 It’s a nice to have, but nice things are nice 🙂

stefreak commented 8 months ago

@RiteshAryal interesting proposal! I presume that you'd expect this to work only for the OCI-based helm registries (calling helm pushhttps://helm.sh/docs/topics/registries/#the-push-subcommand – under the hood)

We will likely never add support for this to the helm Module kind, as it is deprecated and will be removed in 0.14.

At the same time it's definitely possible to implement a Build action kind for helm that supports publishing.

Maybe a first step in that direction would be to support the publish command for exec Build actions, somehow, though it is not really clear how that would look like exactly.