From 6b381dccdab89f7feca06a9f052b4ee7087ba482 Mon Sep 17 00:00:00 2001 From: Andrew Pantuso Date: Wed, 16 Nov 2022 07:54:05 -0500 Subject: [PATCH] fix: ensure webhook can deploy on separate nodes for 2 infra node clusters --- config/deploy/webhook/deployment.yaml.tpl | 18 ++++++++--------- config/olm/addon-operator.csv.tpl.yaml | 20 +++++++++---------- .../manifests/addon-operator.csv.yaml | 20 +++++++++---------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/config/deploy/webhook/deployment.yaml.tpl b/config/deploy/webhook/deployment.yaml.tpl index 9862607d1..2587fdb65 100644 --- a/config/deploy/webhook/deployment.yaml.tpl +++ b/config/deploy/webhook/deployment.yaml.tpl @@ -24,16 +24,14 @@ spec: - key: node-role.kubernetes.io/infra operator: Exists podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - addon-operator-webhook-server - topologyKey: "kubernetes.io/hostname" + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - addon-operator-webhook-server + topologyKey: "kubernetes.io/hostname" tolerations: - effect: NoSchedule key: node-role.kubernetes.io/infra diff --git a/config/olm/addon-operator.csv.tpl.yaml b/config/olm/addon-operator.csv.tpl.yaml index 91001cf49..dfd94a066 100644 --- a/config/olm/addon-operator.csv.tpl.yaml +++ b/config/olm/addon-operator.csv.tpl.yaml @@ -229,7 +229,7 @@ spec: secretName: metrics-server-cert - name: addon-operator-webhooks spec: - replicas: 3 + replicas: 2 selector: matchLabels: app.kubernetes.io/name: addon-operator-webhook-server @@ -248,16 +248,14 @@ spec: - key: node-role.kubernetes.io/infra operator: Exists podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - addon-operator-webhook-server - topologyKey: kubernetes.io/hostname - weight: 100 + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - addon-operator-webhook-server + topologyKey: "kubernetes.io/hostname" containers: - image: quay.io/openshift/addon-operator-webhook:latest livenessProbe: diff --git a/config/openshift/manifests/addon-operator.csv.yaml b/config/openshift/manifests/addon-operator.csv.yaml index 91001cf49..e2382eab4 100755 --- a/config/openshift/manifests/addon-operator.csv.yaml +++ b/config/openshift/manifests/addon-operator.csv.yaml @@ -229,7 +229,7 @@ spec: secretName: metrics-server-cert - name: addon-operator-webhooks spec: - replicas: 3 + replicas: 2 selector: matchLabels: app.kubernetes.io/name: addon-operator-webhook-server @@ -248,16 +248,14 @@ spec: - key: node-role.kubernetes.io/infra operator: Exists podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - addon-operator-webhook-server - topologyKey: kubernetes.io/hostname - weight: 100 + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - addon-operator-webhook-server + topologyKey: kubernetes.io/hostname containers: - image: quay.io/openshift/addon-operator-webhook:latest livenessProbe: