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

Add an example for overwrite individual sub-charts using private image registry #1164

Open
Archer-Li opened this issue Jan 24, 2025 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Archer-Li
Copy link

According to the documentation, it is possible to overwrite the registry for sub-charts. However, the corresponding keys for overwriting from the top level are not mentioned. Including such code snippets in the documentation would be very helpful.

For example, to overwrite the image registry for kube-state-metrics, it would be beneficial to show the corresponding keys that need to be set in the top level values.yaml file.

@Archer-Li Archer-Li marked this as a duplicate of #1165 Jan 24, 2025
@petewall
Copy link
Collaborator

So, you're looking for guidance on setting the registry for the individual subcharts, rather than globally?

@petewall petewall added the documentation Improvements or additions to documentation label Jan 24, 2025
@Archer-Li
Copy link
Author

Correct.

Using kube-state-metrics as an example, the current behavior for globally overwriting the registry changes registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.14.0 to my.registry.com/kube-state-metrics/kube-state-metrics:v2.14.0

I am looking for a solution to use my.registry.com/registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.14.0. I believe that setting the registry for the individual subcharts should allow me to achieve this.

@petewall
Copy link
Collaborator

Awesome. OK, i'll try and write up some documentation for that and let you know.

in the meantime, here's how you can do it, just for KSM:

clusterMetrics:
  kube-state-metrics:
    image:
      registry: my.registry.com/registry.k8s.io

Which is just referencing how to use these values:
https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-state-metrics/values.yaml#L3-L9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants