bitnami/charts-syncer

How to disable container sync

Opened this issue · 6 comments

I have a project where I am syncing helm charts from bitnami to our own registry for policy purposes.

Since v2, it seems that if the chart has image annotations chart syncer automatically sync the containers (annotation that the bitnami charts have) and the field relocateContainerImages at the root of the config disappeared. I also tried setting containerPlatforms to [] without success.

Is there a way to disable container syncing ?

Hi,

Charts syncer v2 uses Helm distribution plugin https://github.com/vmware-labs/distribution-tooling-for-helm. You can use helm dt for relocating the helm charts and not pushing the images.

$ helm pull oci://docker.io/bitnamicharts/wordpress
$ tar -xzf wordpress-22.4.0.tgz && cd wordpress
$ helm dt charts relocate .  <your-registry-and-location-path>

You can check all the Chart.yaml and values.yaml from the chart and subcharts have been modified properly. Then you can package & push the Helm chart to your registry.

I hope it helps.

Oh, I looked a bit into chart-syncer and dt and got that.

From what I read about the relocate command, it does the relocation in the values, which is not what I need, we don't use either the image relocation or the image sync (and ideally I would like to disable both) so sadly no that does not helps, but thanks !

A workaround I though I could use would be to customize the AnnotationsKey, but that is not available from chart-syncer.
Could chart-syncer use helm pull / push instead of wrap/unwrap if that old field was false ?

I have the same question is it possible disable container sync?

I actually have a custom patch that adds two options, one to not update the values file and another to not sync the images. I was getting ready to merge it with the latest version and create a PR.

@gregsidelinger When the PR will be ready?

@gregsidelinger When the PR will be ready?

My initial patch was for v1 as I wrote it last year and never got around to opening a PR. So I had to start over. I opened up PR vmware-labs/distribution-tooling-for-helm#76 to add options to distribution-tooling-for-helm since that is where all that magic looks to happen now. Assuming that gets merged it will be pretty quick to make a PR for chart-syncer to use the new options.