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

De-duplicate values file rewrites #75

Open
petewall opened this issue Oct 18, 2021 · 1 comment
Open

De-duplicate values file rewrites #75

petewall opened this issue Oct 18, 2021 · 1 comment

Comments

@petewall
Copy link
Contributor

If a chart contains a global image registry value, we could possibly update that value many times, resulting in a strange output:

values.yaml

global:
  imageRegistry: docker.io

image:
  repository: bitnami/wordpress
  tag: 5.7.2-debian-10-r0

metrics:
  repository: pwall/apache-exporter
  tag:  0.8.0-debian-10-r378

running relok8s chart move ... --registry harbor-repo.vmware.com will result in:

Computing relocation...
...
Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com
  .global.imageRegistry: harbor-repo.vmware.com

This is confusing and could lead to uncertainty.

@petewall
Copy link
Contributor Author

petewall commented Oct 18, 2021

Running with sub-charts, leads to having interleaved repeated rewrites:

Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com
  .image.repository: pwall/wordpress
  .global.imageRegistry: harbor-repo.vmware.com
  .metrics.image.repository: pwall/apache-exporter
  .global.imageRegistry: harbor-repo.vmware.com
  .volumePermissions.image.repository: pwall/bitnami-shell
  .global.imageRegistry: harbor-repo.vmware.com

Changes to be applied to wordpress/charts/mariadb/values.yaml:
  .image.repository: pwall/mariadb

Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com

Changes to be applied to wordpress/charts/mariadb/values.yaml:
  .metrics.image.repository: pwall/mysqld-exporter

Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com

Changes to be applied to wordpress/charts/mariadb/values.yaml:
  .volumePermissions.image.repository: pwall/bitnami-shell

Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com

Changes to be applied to wordpress/charts/memcached/values.yaml:
  .image.repository: pwall/memcached

Changes to be applied to wordpress/values.yaml:
  .global.imageRegistry: harbor-repo.vmware.com

Changes to be applied to wordpress/charts/memcached/values.yaml:
  .metrics.image.repository: pwall/memcached-exporter
Would you like to proceed? (y/N)

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
@petewall and others