Add pod anti-affinity to Deckhand
This PS adds pod anti-affinity to deckhand pods, so that the scheduler can constrain pods against labels on other pods running on the node. The default soft rule is in place so that if the scheduler can’t satisfy the requirement, the pod will still be scheduled. Change-Id: Icab673726d0473662ccf45c4c576fe20912a1260
This commit is contained in:
parent
fe0be76dfa
commit
aeefd9d121
@ -40,6 +40,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
{{ dict "envAll" $envAll "application" "deckhand" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||
affinity:
|
||||
{{ tuple $envAll "deckhand" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||
nodeSelector:
|
||||
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
|
||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.deckhand.timeout | default "30" }}
|
||||
|
@ -354,6 +354,12 @@ pod:
|
||||
termination_grace_period:
|
||||
deckhand:
|
||||
timeout: 30
|
||||
affinity:
|
||||
anti:
|
||||
type:
|
||||
default: preferredDuringSchedulingIgnoredDuringExecution
|
||||
topologyKey:
|
||||
default: kubernetes.io/hostname
|
||||
replicas:
|
||||
deckhand: 1
|
||||
resources:
|
||||
|
Loading…
x
Reference in New Issue
Block a user