-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[kube-prometheus-stack]: faulty logic when choosing imageRegistry #5581
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
base: main
Are you sure you want to change the base?
[kube-prometheus-stack]: faulty logic when choosing imageRegistry #5581
Conversation
Choose which imageRegistry to use based on whichever is defined. Currently if `.Values.global.imageRegistry` is set to quay.io for example, this image will fail to be pulled because it's located in a different registry. Therefore, the `.Values.prometheusOperator.admissionWebhooks.patch.image.registry` must take precedence over the former since this image is located in a different registry. Signed-off-by: Daniel-Andrei Minca <[email protected]>
0c4dfd9
to
c176fe2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current logic works as indented. The Values.global.imageRegistry
is primary designed for registry mirrors. If you set Values.global.imageRegistry
to an mirror which does not contain the patch image, you have to manually override .Values.prometheusOperator.admissionWebhooks.patch.image.registry
.
It would be a faulty logic if every image follow the same pattern except one.
@jkroepke I agree, that's how it should work. However the situation is different. Let's say you are mirroring But in reality the image The problem's Hope I managed to explain it properly so that you understand the issue here 😅 |
Okay, I understand that But its wrong everywhere, right? |
@jkroepke it's not wrong everywhere. Only in the places where the image is located in a different container registry from That's the problem with the logic here. If all images used by this helm chart would reside in the same container registry then this wouldn't even be required. But here we've got a mixture of registries which users have to be able to overwrite since they're exceptions |
In general, I for an constant behavior. An specific registry definition should always prefer over global.imageRegistry and as I understand, this is not the case, nowhere. Right? |
hmm, I guess so. I'm also for consistency, shall I go ahead and apply this everywhere? |
Yes please |
What this PR does / why we need it
Choose which imageRegistry to use based on whichever is defined.
Currently if
.Values.global.imageRegistry
is set to quay.io for example, this image will fail to be pulled because it's located in a different registry.Therefore, the
.Values.prometheusOperator.admissionWebhooks.patch.image.registry
must take precedence over the former since this image is located in a different registry.Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer
Checklist
[prometheus-couchdb-exporter]
)