From f9422c4b351f0de9b7006a503e610e01c1a1f643 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Date: Tue, 22 Nov 2022 08:25:48 +0100 Subject: [PATCH 1/2] add pdb to CI checks Signed-off-by: Jorge Turrado --- .github/workflows/ci-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index c9af726f..1f845772 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -83,10 +83,10 @@ jobs: run: kubectl create ns keda - name: Template Helm chart - run: helm template keda ./keda/ --namespace keda --set podIdentity.azureWorkload.enabled=${{ matrix.enableAzureWorkloadIdentity }} --set podIdentity.azureWorkload.tenantId=${{ matrix.tenantId }} --set podIdentity.azureWorkload.clientId=${{ matrix.clientId }} + run: helm template keda ./keda/ --namespace keda --set podIdentity.azureWorkload.enabled=${{ matrix.enableAzureWorkloadIdentity }} --set podIdentity.azureWorkload.tenantId=${{ matrix.tenantId }} --set podIdentity.azureWorkload.clientId=${{ matrix.clientId }} --set podDisruptionBudget.operator.maxUnavailable=1 --set podDisruptionBudget.metricServer.maxUnavailable=1 - name: Install Helm chart - run: helm install keda ./keda/ --namespace keda --set podIdentity.azureWorkload.enabled=${{ matrix.enableAzureWorkloadIdentity }} --set podIdentity.azureWorkload.tenantId=${{ matrix.tenantId }} --set podIdentity.azureWorkload.clientId=${{ matrix.clientId }} + run: helm install keda ./keda/ --namespace keda --set podIdentity.azureWorkload.enabled=${{ matrix.enableAzureWorkloadIdentity }} --set podIdentity.azureWorkload.tenantId=${{ matrix.tenantId }} --set podIdentity.azureWorkload.clientId=${{ matrix.clientId }} --set podDisruptionBudget.operator.maxUnavailable=1 --set podDisruptionBudget.metricServer.maxUnavailable=1 - name: Show Kubernetes resources run: kubectl get all --namespace keda From 4f5ab6e195327114ca5a6251b1eaf02c36866b5e Mon Sep 17 00:00:00 2001 From: Jorge Turrado Date: Tue, 22 Nov 2022 08:30:14 +0100 Subject: [PATCH 2/2] use propoer pdb api version as required k8s version already supports policy/v1 Signed-off-by: Jorge Turrado --- keda/templates/13-keda-poddisruptionbudget.yaml | 4 ---- keda/templates/25-metrics-poddisruptionbudget.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/keda/templates/13-keda-poddisruptionbudget.yaml b/keda/templates/13-keda-poddisruptionbudget.yaml index 107931c7..a3329fe3 100755 --- a/keda/templates/13-keda-poddisruptionbudget.yaml +++ b/keda/templates/13-keda-poddisruptionbudget.yaml @@ -1,9 +1,5 @@ {{- if or (or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable) .Values.podDisruptionBudget.operator }} -{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }} apiVersion: policy/v1 -{{- else }} -apiVersion: policy/v1beta1 -{{- end }} kind: PodDisruptionBudget metadata: namespace: {{ .Release.Namespace }} diff --git a/keda/templates/25-metrics-poddisruptionbudget.yaml b/keda/templates/25-metrics-poddisruptionbudget.yaml index 345b8614..fc078d22 100644 --- a/keda/templates/25-metrics-poddisruptionbudget.yaml +++ b/keda/templates/25-metrics-poddisruptionbudget.yaml @@ -1,5 +1,5 @@ {{- if or (or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable) .Values.podDisruptionBudget.metricServer }} -apiVersion: policy/v1beta1 +apiVersion: policy/v1 kind: PodDisruptionBudget metadata: namespace: {{ .Release.Namespace }}