From 224a910852d8b63f9fbd79a40f67a1fa37947b85 Mon Sep 17 00:00:00 2001 From: Suhani Date: Sun, 7 Jun 2026 00:46:44 +0530 Subject: [PATCH 1/4] fix: add standard labels to CRDs Signed-off-by: Suhani --- charts/kyverno-api/templates/_helpers.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/kyverno-api/templates/_helpers.tpl b/charts/kyverno-api/templates/_helpers.tpl index 90e673e..72fe53d 100644 --- a/charts/kyverno-api/templates/_helpers.tpl +++ b/charts/kyverno-api/templates/_helpers.tpl @@ -5,7 +5,15 @@ {{- end -}} {{- define "kyverno-api.labels" -}} -{{- tpl (toYaml .Values.labels) . -}} +helm.sh/chart: crds-{{ include "kyverno-api.chartVersion" . }} +app.kubernetes.io/component: kyverno-api +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/part-of: kyverno-api +app.kubernetes.io/version: {{ include "kyverno-api.chartVersion" . }} +{{- with .Values.labels }} +{{ tpl (toYaml .) $ }} +{{- end }} {{- end -}} {{- define "kyverno-api.annotations" -}} From d316ad46835a42e009a8457fe9d1821f5d4109b3 Mon Sep 17 00:00:00 2001 From: Suhani Date: Mon, 8 Jun 2026 13:56:04 +0530 Subject: [PATCH 2/4] fix: avoid duplicate CRD label keys Signed-off-by: Suhani --- charts/kyverno-api/templates/_helpers.tpl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/charts/kyverno-api/templates/_helpers.tpl b/charts/kyverno-api/templates/_helpers.tpl index 72fe53d..3ba8428 100644 --- a/charts/kyverno-api/templates/_helpers.tpl +++ b/charts/kyverno-api/templates/_helpers.tpl @@ -5,14 +5,27 @@ {{- end -}} {{- define "kyverno-api.labels" -}} -helm.sh/chart: crds-{{ include "kyverno-api.chartVersion" . }} +{{- $customLabels := .Values.labels | default dict -}} +{{- if not (hasKey $customLabels "helm.sh/chart") }} +helm.sh/chart: {{ .Chart.Name }}-{{ include "kyverno-api.chartVersion" . }} +{{- end }} +{{- if not (hasKey $customLabels "app.kubernetes.io/component") }} app.kubernetes.io/component: kyverno-api +{{- end }} +{{- if not (hasKey $customLabels "app.kubernetes.io/instance") }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} +{{- if not (hasKey $customLabels "app.kubernetes.io/managed-by") }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} +{{- if not (hasKey $customLabels "app.kubernetes.io/part-of") }} app.kubernetes.io/part-of: kyverno-api +{{- end }} +{{- if not (hasKey $customLabels "app.kubernetes.io/version") }} app.kubernetes.io/version: {{ include "kyverno-api.chartVersion" . }} +{{- end }} {{- with .Values.labels }} -{{ tpl (toYaml .) $ }} +{{- tpl (toYaml .) $ -}} {{- end }} {{- end -}} From d2d763b17faf08457bf1e6261b852063cd87aa73 Mon Sep 17 00:00:00 2001 From: Suhani Date: Sat, 18 Jul 2026 09:48:33 +0000 Subject: [PATCH 3/4] fix: use appVersion for kyverno-api version label Signed-off-by: Suhani --- charts/kyverno-api/Chart.yaml | 1 + charts/kyverno-api/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/kyverno-api/Chart.yaml b/charts/kyverno-api/Chart.yaml index ea85180..715d7ac 100644 --- a/charts/kyverno-api/Chart.yaml +++ b/charts/kyverno-api/Chart.yaml @@ -1,3 +1,4 @@ apiVersion: v2 name: kyverno-api version: v0.0.0 +appVersion: v0.0.0 \ No newline at end of file diff --git a/charts/kyverno-api/templates/_helpers.tpl b/charts/kyverno-api/templates/_helpers.tpl index 3ba8428..03efc7b 100644 --- a/charts/kyverno-api/templates/_helpers.tpl +++ b/charts/kyverno-api/templates/_helpers.tpl @@ -22,7 +22,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: kyverno-api {{- end }} {{- if not (hasKey $customLabels "app.kubernetes.io/version") }} -app.kubernetes.io/version: {{ include "kyverno-api.chartVersion" . }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} {{- with .Values.labels }} {{- tpl (toYaml .) $ -}} From 2321eee532f5f7e8230859b56524349eb9b739fa Mon Sep 17 00:00:00 2001 From: Suhani Date: Sun, 23 Aug 2026 15:26:04 +0000 Subject: [PATCH 4/4] fix: use Kyverno release for chart appVersion Signed-off-by: Suhani --- .github/workflows/helm-release.yaml | 1 - charts/kyverno-api/Chart.yaml | 2 +- charts/kyverno-api/README.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 508ef3f..8253aa2 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -42,7 +42,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} linting: off charts_dir: charts-tmp - app_version: ${{ steps.semver.outputs.fullversion }} chart_version: ${{ steps.semver.outputs.fullversion }} # - name: Login to GitHub Container Registry # run: | diff --git a/charts/kyverno-api/Chart.yaml b/charts/kyverno-api/Chart.yaml index 715d7ac..746f49e 100644 --- a/charts/kyverno-api/Chart.yaml +++ b/charts/kyverno-api/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: kyverno-api version: v0.0.0 -appVersion: v0.0.0 \ No newline at end of file +appVersion: v1.19.0 diff --git a/charts/kyverno-api/README.md b/charts/kyverno-api/README.md index 8674c05..8dbf4ec 100644 --- a/charts/kyverno-api/README.md +++ b/charts/kyverno-api/README.md @@ -1,6 +1,6 @@ # kyverno-api -![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square) +![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square) ![AppVersion: v1.19.0](https://img.shields.io/badge/AppVersion-v1.19.0-informational?style=flat-square) ## About