diff --git a/charts/kubechecks/Chart.yaml b/charts/kubechecks/Chart.yaml index cd791d3a..ea21292b 100644 --- a/charts/kubechecks/Chart.yaml +++ b/charts/kubechecks/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: kubechecks description: A Helm chart for kubechecks -version: 0.4.0 -appVersion: "1.1.1" +version: 0.4.1 +appVersion: "1.3.3" type: application maintainers: - name: zapier diff --git a/charts/kubechecks/templates/_helpers.tpl b/charts/kubechecks/templates/_helpers.tpl index 8367585c..98422308 100644 --- a/charts/kubechecks/templates/_helpers.tpl +++ b/charts/kubechecks/templates/_helpers.tpl @@ -37,7 +37,7 @@ Common labels helm.sh/chart: {{ include "kubechecks.chart" . }} {{ include "kubechecks.selectorLabels" . }} {{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +app.kubernetes.io/version: {{ coalesce .Values.deployment.image.tag .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- if .Values.commonLabels }} diff --git a/charts/kubechecks/tests/deployment_test.yaml b/charts/kubechecks/tests/deployment_test.yaml index 387b758b..7585558b 100644 --- a/charts/kubechecks/tests/deployment_test.yaml +++ b/charts/kubechecks/tests/deployment_test.yaml @@ -168,3 +168,27 @@ tests: name: new-configmap - secretMap: name: new-secret + - it: should render tag as annotation + chart: + appVersion: 1.0.0 + version: 0.1.0 + release: + name: kubechecks + set: + deployment: + image: + tag: 2.0.0 + asserts: + - isKind: + of: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: ghcr.io/zapier/kubechecks:2.0.0 + - equal: + path: metadata.labels + value: + app.kubernetes.io/instance: kubechecks + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kubechecks + app.kubernetes.io/version: 2.0.0 + helm.sh/chart: kubechecks-0.1.0