From fbeb85321922024e6742b27ce0373a14ef20ea55 Mon Sep 17 00:00:00 2001 From: marino vink Date: Fri, 17 Oct 2025 10:35:57 +0200 Subject: [PATCH] feat(helm): allow set topologySpreadConstraints on singleBinary --- production/helm/loki/templates/single-binary/statefulset.yaml | 4 ++++ production/helm/loki/values.yaml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/production/helm/loki/templates/single-binary/statefulset.yaml b/production/helm/loki/templates/single-binary/statefulset.yaml index d3fa4cc2eaa11..9f3b281b41b0a 100644 --- a/production/helm/loki/templates/single-binary/statefulset.yaml +++ b/production/helm/loki/templates/single-binary/statefulset.yaml @@ -65,6 +65,10 @@ spec: {{- end }} app.kubernetes.io/part-of: memberlist spec: + {{- with .Values.singleBinary.topologySpreadConstraints }} + topologySpreadConstraints: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} serviceAccountName: {{ include "loki.serviceAccountName" . }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{ include "loki.enableServiceLinks" . }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index bc72cd974457f..4b775bc5f045f 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -1494,6 +1494,9 @@ singleBinary: app.kubernetes.io/name: '{{ include "loki.name" . }}' app.kubernetes.io/instance: '{{ .Release.Name }}' topologyKey: kubernetes.io/hostname + # -- Topology Spread Constraints for single binary pods + # The value will be passed through tpl. + topologySpreadConstraints: [] # -- DNS config for single binary pods dnsConfig: {} # -- Node selector for single binary pods