diff --git a/charts/k8s-service/templates/_deployment_spec.tpl b/charts/k8s-service/templates/_deployment_spec.tpl index 11510f8..caac06e 100644 --- a/charts/k8s-service/templates/_deployment_spec.tpl +++ b/charts/k8s-service/templates/_deployment_spec.tpl @@ -461,6 +461,11 @@ spec: {{ toYaml . | indent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.priorityClassName }} priorityClassName: {{ toYaml . | indent 8 }} diff --git a/charts/k8s-service/values.yaml b/charts/k8s-service/values.yaml index 223deb2..c411edb 100644 --- a/charts/k8s-service/values.yaml +++ b/charts/k8s-service/values.yaml @@ -682,11 +682,12 @@ secrets: {} # like: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ containerResources: {} -# nodeSelector and affinity specify restrictions on what node this pod should be scheduled on. +# nodeSelector, affinity and topologySpreadConstraints specify restrictions on what node this pod should be scheduled on. # NOTE: These variables are injected directly into the pod spec. See the official documentation for what this might look # like: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ nodeSelector: {} affinity: {} +topologySpreadConstraints: [] # priorityClassName assigns a priorityClass to the deployment allowing pods to preempt or be preempted. # See https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass