From 3a8c4bdbed37d734f86dd218a217e097c2b4e48a Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Tue, 30 Jan 2024 11:54:05 +0900 Subject: [PATCH] chore: Changed the process to expand yaml so that maxUnavailable, etc. can be used. Signed-off-by: kahirokunn --- .../gatekeeper-controller-manager-poddisruptionbudget.yaml | 3 +-- cmd/build/helmify/kustomize-for-helm.yaml | 2 +- cmd/build/helmify/replacements.go | 2 +- .../gatekeeper-controller-manager-poddisruptionbudget.yaml | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml b/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml index 424f6a67c44..325357071d4 100644 --- a/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml +++ b/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml @@ -11,8 +11,7 @@ metadata: release: '{{ .Release.Name }}' name: gatekeeper-controller-manager namespace: '{{ .Release.Namespace }}' -spec: - minAvailable: {{ .Values.pdb.controllerManager.minAvailable }} +spec: {{ .Values.pdb.controllerManager | toYaml | nindent 2 }} selector: matchLabels: app: '{{ template "gatekeeper.name" . }}' diff --git a/cmd/build/helmify/kustomize-for-helm.yaml b/cmd/build/helmify/kustomize-for-helm.yaml index bd8847ac979..701e4509a1a 100644 --- a/cmd/build/helmify/kustomize-for-helm.yaml +++ b/cmd/build/helmify/kustomize-for-helm.yaml @@ -297,7 +297,7 @@ metadata: name: gatekeeper-controller-manager namespace: gatekeeper-system spec: - minAvailable: HELMSUBST_PDB_CONTROLLER_MANAGER_MINAVAILABLE + minAvailable: HELMSUBST_PDB_CONTROLLER_MANAGER selector: matchLabels: control-plane: controller-manager diff --git a/cmd/build/helmify/replacements.go b/cmd/build/helmify/replacements.go index a47238dbd64..4ac77d35f54 100644 --- a/cmd/build/helmify/replacements.go +++ b/cmd/build/helmify/replacements.go @@ -217,7 +217,7 @@ var replacements = map[string]string{ - 'services/status' {{- end }}`, - "HELMSUBST_PDB_CONTROLLER_MANAGER_MINAVAILABLE": `{{ .Values.pdb.controllerManager.minAvailable }}`, + "HELMSUBST_PDB_CONTROLLER_MANAGER": `{{ .Values.pdb.controllerManager | toYaml | nindent 2 }}`, `HELMSUBST_AUDIT_CONTROLLER_MANAGER_DEPLOYMENT_IMAGE_RELEASE: ""`: `{{- if .Values.image.release }} image: {{ .Values.image.repository }}:{{ .Values.image.release }} diff --git a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml index 424f6a67c44..cf4e0e0f842 100644 --- a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml +++ b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml @@ -12,7 +12,7 @@ metadata: name: gatekeeper-controller-manager namespace: '{{ .Release.Namespace }}' spec: - minAvailable: {{ .Values.pdb.controllerManager.minAvailable }} + minAvailable: {{ .Values.pdb.controllerManager | toYaml | nindent 2 }} selector: matchLabels: app: '{{ template "gatekeeper.name" . }}'