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

bug: Wrong version set in deployment labels when passing image tag in values file #51

Open
OrKarstoft opened this issue Jun 27, 2023 · 0 comments
Labels
bug Something isn't working helm-chart Changes to the Helm chart.

Comments

@OrKarstoft
Copy link
Contributor

Bug Report

Helm chart version 2.0.0

Current behavior:

If you set the following values, the label app.kubernetes.io/version is still set to app.kubernetes.io/version: "0.3.1"

image:
  pullPolicy: Always
  tag: 0.3.2

Expected behavior:

The label should be app.kubernetes.io/version: "0.3.2" as set in the values file.

Steps to reproduce:

Deploy with a tag value in the values file.

Related code:

I think it's here in the chart that needs fixing.

{{/*
Common labels
*/}}
{{- define "chart.labels" -}}
helm.sh/chart: {{ include "chart.chart" . }}
{{ include "chart.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

Other information:

@OrKarstoft OrKarstoft added bug Something isn't working helm-chart Changes to the Helm chart. labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working helm-chart Changes to the Helm chart.
Projects
None yet
Development

No branches or pull requests

1 participant