vmware-labs / distribution-tooling-for-helm

Helm Distribution plugin is is a set of utilities and Helm Plugin for making offline work with Helm Charts easier. It is meant to be used for creating reproducible and relocatable packages for Helm Charts that can be moved around registries without hassles. This is particularly useful for distributing Helm Charts into airgapped environments.
Apache License 2.0
65 stars 10 forks source link

dt relocate to be applied on all `values_smth.yaml` files #52

Closed BLaurent closed 4 months ago

BLaurent commented 4 months ago

Is your feature request related to a problem? Please describe.

When performing a charts relocate CHART_PATH OCI_URI only values.yaml is updated. This can be very handy to apply the relocation to all values_smth.yaml present in the chart. Charts can include various values_smth.yaml files that are used depending of the context.

Describe the solution you'd like

The cli could provide an extra flag like helm

 -f, --values strings                             specify values in a YAML file or a URL (can specify multiple) 

If no flag applied keep the current behaviour be applying update only to values.yaml. If flag applied update only files pass as argument.

Describe alternatives you've considered

No response

Additional context

Changes in pkg/relocator/chart.go is needed to take in account additional files fortunately helm chart loader already load all canonical (Chart.yaml, values.yaml, values.schema.json, templates/, charts/ ) and other non canonical files already.

alemorcuq commented 4 months ago

Hi, @BLaurent. I see your point, and I agree that incorporating this into the tool would greatly enhance user experience. Thank you for taking the time to suggest this feature.

BLaurent commented 4 months ago

Hi @alemorcuq,

Thanks for your reply, I do not know how you do the triage for such a feature. Do you run some sort of planning with a fixed release date, like you do 3/4 release big per year, with some fixes and patches in between or just go with the flow and tag when you feel the need ?

Thanks in advance.

mpermar commented 4 months ago

@BLaurent , we are doing some chart syncer revamp to use dt and this issue request should come exactly after that. It's a very good idea. Can't put dates but should be really in the next couple of weeks.

alemorcuq commented 4 months ago

@BLaurent, we have released version 0.4.0 including a new --version flag in the charts relocate and unwrap commands. Thanks for taking the time to request this feature and let us know any feedback you may have.

BLaurent commented 3 months ago

Nice !!!, Thanks for implementing this. I've looked at the MR, there is a lot of files with very minor modifications, I guess you've fixed lint warning as well

alemorcuq commented 3 months ago

Nice !!!, Thanks for implementing this. I've looked at the MR, there is a lot of files with very minor modifications, I guess you've fixed lint warning as well

Yes, the linter went crazy on me.

If you are curious about the implementation without those lint fixes, you can see it in https://github.com/vmware-labs/distribution-tooling-for-helm/pull/56/commits/508ba33381cb51289b41f31dc55a7626b2e5335a.