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

How to disable container sync #213

Open
antonincms opened this issue May 28, 2024 · 6 comments
Open

How to disable container sync #213

antonincms opened this issue May 28, 2024 · 6 comments

Comments

@antonincms
Copy link

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 ?

@beltran-rubo
Copy link
Contributor

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.

@antonincms
Copy link
Author

antonincms commented May 28, 2024

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 ?

@arturzielinskicard
Copy link

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

@gregsidelinger
Copy link

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.

@arturzielinskicard
Copy link

@gregsidelinger When the PR will be ready?

@gregsidelinger
Copy link

@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.

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

4 participants