From 0bbf1d435a44c7309be5de34aae79eaa50a3da4e Mon Sep 17 00:00:00 2001 From: Vale Date: Tue, 29 Aug 2023 13:28:23 +0900 Subject: [PATCH] Add affinity --- manifests/deployment.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 7422c53..c7f34c3 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -7,6 +7,10 @@ metadata: role: static spec: replicas: 2 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 selector: matchLabels: app: advent @@ -17,6 +21,14 @@ spec: app: advent role: static spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app: advent + role: static + topologyKey: kubernetes.io/hostname containers: - name: advent-static image: ghcr.io/valerauko/personal-advent:1.1.0