From 5f21d9e14799390962e7a97c3eb2ab95ff9b434c Mon Sep 17 00:00:00 2001 From: Joao Pedro Silva Date: Mon, 6 Nov 2023 16:01:58 +0000 Subject: [PATCH] fix: Ident podLabels on deployments During [this change](https://github.com/open-policy-agent/gatekeeper/pull/2788/files#diff-8418507fa48b71204028eeb671810c5e5c5e999cb23af3bbdceb06bc26bdc92dL39) the indentation was removed from the template but not added to the deployment manifest. Signed-off-by: Joao Pedro Silva --- cmd/build/helmify/main.go | 2 +- .../gatekeeper/templates/gatekeeper-audit-deployment.yaml | 2 +- .../templates/gatekeeper-controller-manager-deployment.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/build/helmify/main.go b/cmd/build/helmify/main.go index 34f0d087026..ce7518fe837 100644 --- a/cmd/build/helmify/main.go +++ b/cmd/build/helmify/main.go @@ -137,7 +137,7 @@ func (ks *kindSet) Write() error { } if kind == DeploymentKind { - obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . }}", 1) + obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . | nindent 8 }}", 1) } if name == "gatekeeper-manager-role" && kind == "Role" { diff --git a/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml b/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml index 1dc1ebac29c..9ff5ec4d38a 100644 --- a/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml +++ b/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml @@ -33,7 +33,7 @@ spec: {{- toYaml .Values.auditPodAnnotations | trim | nindent 8 }} {{- end }} labels: -{{- include "gatekeeper.podLabels" . }} +{{- include "gatekeeper.podLabels" . | nindent 8 }} app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' control-plane: audit-controller diff --git a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml index 70c7571c2ce..8ccdcc10e1b 100644 --- a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml +++ b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml @@ -32,7 +32,7 @@ spec: {{- toYaml .Values.podAnnotations | trim | nindent 8 }} {{- end }} labels: -{{- include "gatekeeper.podLabels" . }} +{{- include "gatekeeper.podLabels" . | nindent 8 }} app: '{{ template "gatekeeper.name" . }}' chart: '{{ template "gatekeeper.name" . }}' control-plane: controller-manager