diff --git a/charts/deckhand/templates/deployment.yaml b/charts/deckhand/templates/deployment.yaml index 24f9137c..3773b9f7 100644 --- a/charts/deckhand/templates/deployment.yaml +++ b/charts/deckhand/templates/deployment.yaml @@ -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" }} diff --git a/charts/deckhand/values.yaml b/charts/deckhand/values.yaml index b92ea35d..58e5faa2 100644 --- a/charts/deckhand/values.yaml +++ b/charts/deckhand/values.yaml @@ -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: