diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 2292c0a1..50bd345e 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -25,10 +25,13 @@ jobs: set -e TAG=${{ github.ref_name }} echo "CHART_VERSION=${TAG#charts-}" >> $GITHUB_ENV + VERSION=$(git describe --tags --match "v*" --abbrev=0) + echo "APP_VERSION=$VERSION" >> $GITHUB_ENV - name: Run charts releaser uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 #v1.7.0 with: token: ${{ secrets.GITHUB_TOKEN }} linting: off charts_dir: charts + app_version: ${{ env.APP_VERSION }} chart_version: ${{ env.CHART_VERSION }} diff --git a/charts/kyverno-authz-server/templates/_helpers.tpl b/charts/kyverno-authz-server/templates/_helpers.tpl index c1655357..e5a11447 100644 --- a/charts/kyverno-authz-server/templates/_helpers.tpl +++ b/charts/kyverno-authz-server/templates/_helpers.tpl @@ -20,9 +20,9 @@ {{- define "kyverno-authz-server.service-account.name" -}} {{- if .Values.rbac.create -}} - {{- default (include "kyverno-authz-server.name" .) .Values.rbac.serviceAccount.name -}} + {{- default (include "kyverno-authz-server.name" .) .Values.rbac.serviceAccount.name -}} {{- else -}} - {{- required "A service account name is required when `rbac.create` is set to `false`" .Values.rbac.serviceAccount.name -}} + {{- required "A service account name is required when `rbac.create` is set to `false`" .Values.rbac.serviceAccount.name -}} {{- end -}} {{- end -}} diff --git a/charts/kyverno-authz-server/templates/deployment.yaml b/charts/kyverno-authz-server/templates/deployment.yaml index 7163b6ee..e0bea971 100644 --- a/charts/kyverno-authz-server/templates/deployment.yaml +++ b/charts/kyverno-authz-server/templates/deployment.yaml @@ -78,7 +78,7 @@ spec: containers: {{- with .Values.containers.server }} - name: server - image: {{ include "kyverno-authz-server.image" .image }} + image: {{ include "kyverno-authz-server.image" (mustMerge .image (dict "tag" (default $.Chart.Version $.Chart.AppVersion))) }} imagePullPolicy: {{ .image.pullPolicy }} {{- with .resources }} resources: