From 88f180b683e7b8f4e10f59d9b6750f99b6f6dbed Mon Sep 17 00:00:00 2001 From: Venkata Krishna Rohit Sakala Date: Thu, 8 Jun 2023 09:20:27 -0700 Subject: [PATCH] Fix indentation and nodeselector, tolerations issues in gatekeeper chart --- .../patch/templates/_helpers.tpl.patch | 4 ++-- .../webhook-configs-pre-delete.yaml.patch | 17 ++++++++++++++++- .../generated-changes/patch/values.yaml.patch | 9 ++++++++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/packages/rancher-gatekeeper/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-gatekeeper/generated-changes/patch/templates/_helpers.tpl.patch index dcd1cbdee..00f5072fa 100644 --- a/packages/rancher-gatekeeper/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-gatekeeper/generated-changes/patch/templates/_helpers.tpl.patch @@ -12,7 +12,7 @@ +{{- end -}} +{{- end -}} + -+{{/* + {{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} @@ -27,7 +27,7 @@ +kubernetes.io/os: linux +{{- end -}} + - {{/* ++{{/* Output post install webhook probe container entry */}} {{- define "gatekeeper.postInstallWebhookProbeContainer" -}} diff --git a/packages/rancher-gatekeeper/generated-changes/patch/templates/webhook-configs-pre-delete.yaml.patch b/packages/rancher-gatekeeper/generated-changes/patch/templates/webhook-configs-pre-delete.yaml.patch index 66d9029bd..3761372aa 100644 --- a/packages/rancher-gatekeeper/generated-changes/patch/templates/webhook-configs-pre-delete.yaml.patch +++ b/packages/rancher-gatekeeper/generated-changes/patch/templates/webhook-configs-pre-delete.yaml.patch @@ -9,14 +9,29 @@ imagePullPolicy: {{ .Values.preUninstall.deleteWebhookConfigurations.image.pullPolicy }} args: - delete -@@ -54,12 +54,10 @@ +@@ -46,7 +46,7 @@ + - mutatingwebhookconfiguration/{{ .Values.mutatingWebhookName }} + {{- end }} + resources: +- {{- toYaml .Values.preUninstall.resources | nindent 10 }} ++ {{- toYaml .Values.preUninstall.resources | nindent 12 }} + securityContext: + {{- if .Values.enableRuntimeDefaultSeccompProfile }} + seccompProfile: +@@ -54,12 +54,16 @@ {{- end }} {{- toYaml .Values.preUninstall.securityContext | nindent 10 }} {{- with .Values.preUninstall }} - nodeSelector: - {{- toYaml .nodeSelector | nindent 8 }} + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} ++{{- if .nodeSelector }} ++{{ toYaml .nodeSelector | indent 8 }} ++{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} ++{{- if .tolerations }} ++{{ toYaml .tolerations | indent 8 }} ++{{- end }} affinity: {{- toYaml .affinity | nindent 8 }} - tolerations: diff --git a/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch b/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch index 67ec6d523..a3528259c 100644 --- a/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch @@ -47,7 +47,7 @@ tag: 7.83.1 pullPolicy: IfNotPresent pullSecrets: [] -@@ -121,7 +124,7 @@ +@@ -121,13 +124,13 @@ extraRules: [] enabled: false image: @@ -56,6 +56,13 @@ tag: v3.12.0 pullPolicy: IfNotPresent pullSecrets: [] + affinity: {} + tolerations: [] +- nodeSelector: {kubernetes.io/os: linux} ++ nodeSelector: {} + resources: {} + securityContext: + allowPrivilegeEscalation: false @@ -171,7 +174,7 @@ weight: 100 topologySpreadConstraints: []