Merge pull request #69 from ankeesler/pod-anti-affinity

Add pod anti-affinity to make our HA deployment more HA
This commit is contained in:
Andrew Keesler 2020-09-08 11:01:55 -04:00 committed by GitHub
commit f8f16fadb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,6 +132,17 @@ spec:
#! "system-cluster-critical" cannot be used outside the kube-system namespace until Kubernetes >= 1.17, #! "system-cluster-critical" cannot be used outside the kube-system namespace until Kubernetes >= 1.17,
#! so we skip setting this for now (see https://github.com/kubernetes/kubernetes/issues/60596). #! so we skip setting this for now (see https://github.com/kubernetes/kubernetes/issues/60596).
#!priorityClassName: system-cluster-critical #!priorityClassName: system-cluster-critical
#! This will help make sure our multiple pods run on different nodes, making
#! our deployment "more" "HA".
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
labelSelector:
matchLabels:
app: #@ data.values.app_name
topologyKey: kubernetes.io/hostname
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service