diff --git a/charts/mercure/templates/deployment.yaml b/charts/mercure/templates/deployment.yaml index 6ee79a77..99e685aa 100644 --- a/charts/mercure/templates/deployment.yaml +++ b/charts/mercure/templates/deployment.yaml @@ -118,6 +118,10 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- tpl . $ | nindent 8 }} + {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/charts/mercure/values.yaml b/charts/mercure/values.yaml index 808f3cc7..f9b5b69a 100644 --- a/charts/mercure/values.yaml +++ b/charts/mercure/values.yaml @@ -136,6 +136,16 @@ tolerations: [] # See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. affinity: {} +# -- [Topology spread constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) configuration. +# This is a template +# topologySpreadConstraints: | +# - maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule +# labelSelector: +# matchLabels: +# {{- include "mercure.selectorLabels" . | nindent 6 }} + # -- Enable persistence using [Persistent Volume Claims](http://kubernetes.io/docs/user-guide/persistent-volumes/), only useful if you the BoltDB transport. persistence: enabled: false