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

[prometheus-blackbox-exporter] Version label in resources doesn't inherit changes from values #4895

Open
MytkoEnko opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MytkoEnko
Copy link

Describe the bug a clear and concise description of what the bug is.

In prometheus-blackbox-exporter and many others the app.kubernetes.io/version label is hardcoded to .Chart.AppVersion and doesn't reflect changes that can be set in chart's values such as .Values.image.tag that is contradiction to what is recommended in kubernetes documentation

Please consider setting proper inheritance such as:
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}

What's your helm version?

v3.16.1

What's your kubectl version?

v1.28.13

Which chart?

prometheus-blackbox-exporter

What's the chart version?

9.0.0

What happened?

When I apply a chart and set .Values.image.tag to v0.24.0 the resources created have a label set to a wrong version (inherited from .Chart.AppVersion = app.kubernetes.io/version: "v0.25.0"

What you expected to happen?

I expected label to represent the current version of the application (as suggested in kubernetes documentation):
app.kubernetes.io/version: "v0.24.0"

How to reproduce it?

Run helm template test prometheus-community/prometheus-blackbox-exporter --set image.tag="v0.24.0" and check the labels produced for the resources

Enter the changed values of values.yaml?

image:
tag: v0.24.0

Enter the command that you execute and failing/misfunctioning.

helm template test prometheus-community/prometheus-blackbox-exporter --set image.tag="v0.24.0"

Anything else we need to know?

This issue seems to be present in multiple charts, please check it and possibly update in other charts.

@MytkoEnko MytkoEnko added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant