Skip to content

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

@OrKarstoft

Description

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelm-chartChanges to the Helm chart.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions