From a358eec9e6c4395d3dc8d2cc3512e6fc016de205 Mon Sep 17 00:00:00 2001 From: Andreas Kallistros Date: Mon, 30 Oct 2023 19:17:44 +0200 Subject: [PATCH] Helm:allow topologySpreadConstraints --- docs/sources/setup/install/helm/reference.md | 36 +++++++++++++++++++ production/helm/loki/Chart.yaml | 2 +- .../backend/statefulset-backend.yaml | 4 +++ .../templates/gateway/deployment-gateway.yaml | 4 +++ .../loki/templates/read/statefulset-read.yaml | 4 +++ .../templates/write/statefulset-write.yaml | 4 +++ production/helm/loki/values.yaml | 8 +++++ 7 files changed, 61 insertions(+), 1 deletion(-) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index 6ec6797fdc48..a3516706f594 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -366,6 +366,15 @@ null
 []
 
+ + + + backend.topologySpreadConstraints + list + Topology Spread Constraints for backend pods +
+[]
+
@@ -1445,6 +1454,15 @@ null
 []
 
+ + + + gateway.topologySpreadConstraints + list + Topology Spread Constraints for gateway pods +
+[]
+
@@ -3448,6 +3466,15 @@ null
 []
 
+ + + + read.topologySpreadConstraints + list + Topology Spread Constraints for read pods +
+[]
+
@@ -4748,6 +4775,15 @@ null
 []
 
+ + + + write.topologySpreadConstraints + list + Topology Spread Constraints for write pods +
+[]
+
diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 1e514c2f45a8..992cd3cd0228 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.9.2 -version: 5.36.0 +version: 5.36.1 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml index 26022c04ffe0..0bdef7e8e777 100644 --- a/production/helm/loki/templates/backend/statefulset-backend.yaml +++ b/production/helm/loki/templates/backend/statefulset-backend.yaml @@ -215,6 +215,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.backend.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.backend.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/production/helm/loki/templates/gateway/deployment-gateway.yaml b/production/helm/loki/templates/gateway/deployment-gateway.yaml index de6321b76486..5605f9287d20 100644 --- a/production/helm/loki/templates/gateway/deployment-gateway.yaml +++ b/production/helm/loki/templates/gateway/deployment-gateway.yaml @@ -108,6 +108,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.gateway.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.gateway.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/production/helm/loki/templates/read/statefulset-read.yaml b/production/helm/loki/templates/read/statefulset-read.yaml index a9213e7f9879..3b0d91d926a3 100644 --- a/production/helm/loki/templates/read/statefulset-read.yaml +++ b/production/helm/loki/templates/read/statefulset-read.yaml @@ -131,6 +131,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.read.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.read.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index 79aed8ddd314..fdbc2f04d20b 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -150,6 +150,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.write.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.write.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index eada3863e2a8..c09791a84ac7 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -800,6 +800,8 @@ write: dnsConfig: {} # -- Node selector for write pods nodeSelector: {} + # -- Topology Spread Constraints for write pods + topologySpreadConstraints: [] # -- Tolerations for write pods tolerations: [] # -- The default is to deploy all pods in parallel. @@ -976,6 +978,8 @@ read: dnsConfig: {} # -- Node selector for read pods nodeSelector: {} + # -- Topology Spread Constraints for read pods + topologySpreadConstraints: [] # -- Tolerations for read pods tolerations: [] # -- The default is to deploy all pods in parallel. @@ -1077,6 +1081,8 @@ backend: dnsConfig: {} # -- Node selector for backend pods nodeSelector: {} + # -- Topology Spread Constraints for backend pods + topologySpreadConstraints: [] # -- Tolerations for backend pods tolerations: [] # -- The default is to deploy all pods in parallel. @@ -1333,6 +1339,8 @@ gateway: dnsConfig: {} # -- Node selector for gateway pods nodeSelector: {} + # -- Topology Spread Constraints for gateway pods + topologySpreadConstraints: [] # -- Tolerations for gateway pods tolerations: [] # Gateway service configuration