From 05bb957e71401479c7a04df594d88ad97c6609ba Mon Sep 17 00:00:00 2001 From: "Marco Maurer (-Kilchhofer)" Date: Thu, 28 Mar 2024 15:48:37 +0100 Subject: [PATCH] chore: Update to app version 2.9.6 (#50) * chore: Update to app version 2.9.6 * fix: Fix PDB compat for K8s versions >=1.21 * fix: Use keycloak image via quay.io * chore: Wait until keycloak deployment completes --- .github/manifest.yaml | 2 +- .github/workflows/lint-and-test.yml | 1 + charts/gatekeeper/Chart.yaml | 4 ++-- charts/gatekeeper/templates/_helpers.tpl | 11 +++++++++++ charts/gatekeeper/templates/pdb.yaml | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/manifest.yaml b/.github/manifest.yaml index 6630867..c87a862 100644 --- a/.github/manifest.yaml +++ b/.github/manifest.yaml @@ -2214,7 +2214,7 @@ spec: spec: containers: - name: keycloak - image: jboss/keycloak:16.1.1 + image: quay.io/keycloak/keycloak:16.1.1 env: - name: KEYCLOAK_USER value: admin diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 6946ec4..204b7da 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -50,6 +50,7 @@ jobs: run: | kubectl config use-context kind-chart-testing kubectl apply -f .github/manifest.yaml + kubectl rollout status deployment/keycloak --timeout=600s - name: Run chart-testing (install) run: ct install --config .github/ct.yaml diff --git a/charts/gatekeeper/Chart.yaml b/charts/gatekeeper/Chart.yaml index 48db71e..776abae 100644 --- a/charts/gatekeeper/Chart.yaml +++ b/charts/gatekeeper/Chart.yaml @@ -24,5 +24,5 @@ sources: maintainers: - name: gogatekeeper url: https://gogatekeeper.github.io/ -version: 0.1.46 -appVersion: "2.9.4" +version: 0.1.47 +appVersion: "2.9.6" diff --git a/charts/gatekeeper/templates/_helpers.tpl b/charts/gatekeeper/templates/_helpers.tpl index 672db8f..08b2364 100644 --- a/charts/gatekeeper/templates/_helpers.tpl +++ b/charts/gatekeeper/templates/_helpers.tpl @@ -74,6 +74,17 @@ Return the appropriate apiVersion for ingress {{- end -}} {{- end -}} +{{/* +Return the appropriate apiVersion for PodDisruptionBudget +*/}} +{{- define "gatekeeper.pdb.apiVersion" -}} +{{- if semverCompare "<1.21-0" (include "gatekeeper.kubeVersion" $) -}} +{{- print "policy/v1beta1" -}} +{{- else -}} +{{- print "policy/v1" -}} +{{- end -}} +{{- end -}} + {{/* Return the target Kubernetes version */}} diff --git a/charts/gatekeeper/templates/pdb.yaml b/charts/gatekeeper/templates/pdb.yaml index f742f53..bc72b65 100644 --- a/charts/gatekeeper/templates/pdb.yaml +++ b/charts/gatekeeper/templates/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.pdb.create }} -apiVersion: policy/v1beta1 +apiVersion: {{ include "gatekeeper.pdb.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "gatekeeper.fullname" . }}