From 3997294089cd3cb24d7770e735b4e726f09918b3 Mon Sep 17 00:00:00 2001 From: xpadev Date: Thu, 29 Aug 2024 23:42:44 +0900 Subject: [PATCH] feat: add pod anti affinity --- kubernetes/mattermost/mattermost.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kubernetes/mattermost/mattermost.yml b/kubernetes/mattermost/mattermost.yml index e283c2d..bbdef7c 100644 --- a/kubernetes/mattermost/mattermost.yml +++ b/kubernetes/mattermost/mattermost.yml @@ -23,6 +23,18 @@ spec: securityContext: fsGroup: 2000 serviceAccountName: mattermost-primary + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - mattermost + topologyKey: topology.kubernetes.io/zone initContainers: - name: secret-placer image: busybox