From 3e3ce01bc55e5e0d5ea5cc03995f6f1037901b25 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sun, 15 Jan 2023 19:48:22 -0600 Subject: [PATCH] Tweak K8s deployment --- deploy/deployment.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index e041868..4341dfa 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -5,6 +5,7 @@ metadata: name: garrettmills-dev namespace: default spec: + replicas: 2 selector: matchLabels: app: garrettmills-dev @@ -15,6 +16,17 @@ spec: labels: app: garrettmills-dev spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: ['garrettmills-dev'] + topologyKey: 'kubernetes.io/hostname' containers: - name: garrettmills-www image: registry.millslan.net/garrettmills/www