From 79943cc9e826e505109915f1a16e02e57c308fd9 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 23 Jan 2024 11:08:26 -0800 Subject: [PATCH] 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