From 79943cc9e826e505109915f1a16e02e57c308fd9 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 23 Jan 2024 11:08:26 -0800 Subject: [PATCH 1/2] Adds an affinity, podAntiAffinity, to the worker and the web pods --- ops/production-deploy.tmpl.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index b830391e..e63663ba 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -220,6 +220,16 @@ worker: limits: memory: "8Gi" cpu: "2000m" + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: name + operator: In + values: + - {{ include "hyrax.fullname" . }}-worker + topologyKey: "kubernetes.io/hostname" podSecurityContext: runAsUser: 1001 runAsGroup: 101 @@ -228,6 +238,17 @@ worker: extraVolumeMounts: *volMounts extraEnvVars: *envVars +affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: name + operator: In + values: + - {{ include "hyrax.fullname" . }} + topologyKey: "kubernetes.io/hostname" + podSecurityContext: runAsUser: 1001 runAsGroup: 101 From 8b5c26a6825e07a990ce5fee7cec51dc3b8c72a4 Mon Sep 17 00:00:00 2001 From: April Rieger <63515648+aprilrieger@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:07:06 -0800 Subject: [PATCH 2/2] Update ops/production-deploy.tmpl.yaml Co-authored-by: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> --- ops/production-deploy.tmpl.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index e63663ba..a50f77af 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -239,15 +239,15 @@ worker: extraEnvVars: *envVars affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: name - operator: In - values: - - {{ include "hyrax.fullname" . }} - topologyKey: "kubernetes.io/hostname" + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: name + operator: In + values: + - {{ include "hyrax.fullname" . }} + topologyKey: "kubernetes.io/hostname" podSecurityContext: runAsUser: 1001