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

[kube-state-metrics] Ignore global values for kube-state-metrics #4337

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

megum1n
Copy link

@megum1n megum1n commented Mar 5, 2024

What this PR does / why we need it

Currently, I can set .Values.global.imageRegistry in the kube-prometheus-stack chart and this value will be used for all images in the chart and subcharts.
So, if I want to use my private registry for all images, I have two options:

  1. Override registry for every image in values file (a lot of overrides)
  2. Set global registry in values file and replicate all images while keeping original path (/kube-state-metrics/kube-state-metrics, /prometheus/alertmanager)

Almost all images in the chart are located in the quay.io registry, but kube-state-metrics image is from registry.k8s.io.
Private registries often use pull trough cache, so there is no option to keep original path in the registry. Path must start with the prefix, depending on the source registry.
i.e. registry.k8s.io/kube-state-metrics/kube-state-metrics => private.registry.com/k8s/kube-state-metrics/kube-state-metrics

I suggest a third option:

  • Set global registry in values file and use .Values.ignoreGlobal flag in kube-state-metrics chart to ignore it. Then I can safely override registry via .Values.kube-state-metrics.image.registry and there will be less overrides in my value file.

Special notes for your reviewer

This w/a is kinda janky, please let me know if you have a better w/a for the problem.

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Signed-off-by: megum1n <misaka@pantsu.moe>
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

Successfully merging this pull request may close these issues.

None yet

1 participant