From eb9aefd2ab4dcadad0b1c2ab4ba241dd8105631a Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Wed, 9 Sep 2020 22:24:28 +0530 Subject: [PATCH] metallb: Remove additional nodeSelector in deployment - Fix the regression added in the previous update by removing the extraneous nodeSelector field. - Move the nodeSelector golang template block down so that in the next update cycle we don't encounter this issue. Signed-off-by: Suraj Deshmukh --- pkg/components/metallb/manifests.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/components/metallb/manifests.go b/pkg/components/metallb/manifests.go index 188637fa3..9b056d535 100644 --- a/pkg/components/metallb/manifests.go +++ b/pkg/components/metallb/manifests.go @@ -248,12 +248,6 @@ spec: app: metallb component: controller spec: - {{- if .ControllerNodeSelectors }} - nodeSelector: - {{- range $key, $value := .ControllerNodeSelectors }} - {{ $key }}: "{{ $value }}" - {{- end }} - {{- end }} containers: - args: - --port=7472 @@ -274,8 +268,12 @@ spec: drop: - all readOnlyRootFilesystem: true + {{- if .ControllerNodeSelectors }} nodeSelector: - beta.kubernetes.io/os: linux + {{- range $key, $value := .ControllerNodeSelectors }} + {{ $key }}: "{{ $value }}" + {{- end }} + {{- end }} securityContext: runAsNonRoot: true runAsUser: 65534