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 ea85180..746f49e 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: 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 diff --git a/charts/kyverno-api/templates/_helpers.tpl b/charts/kyverno-api/templates/_helpers.tpl index 90e673e..03efc7b 100644 --- a/charts/kyverno-api/templates/_helpers.tpl +++ b/charts/kyverno-api/templates/_helpers.tpl @@ -5,7 +5,28 @@ {{- end -}} {{- define "kyverno-api.labels" -}} -{{- tpl (toYaml .Values.labels) . -}} +{{- $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: {{ .Chart.AppVersion | quote }} +{{- end }} +{{- with .Values.labels }} +{{- tpl (toYaml .) $ -}} +{{- end }} {{- end -}} {{- define "kyverno-api.annotations" -}}