feat: expose topologySpreadConstraints for distributed deployment (#14853)

pull/14903/head
mericks 6 months ago committed by GitHub
parent a8f7851161
commit d0751071a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 80
      docs/sources/setup/install/helm/reference.md
  2. 2
      production/helm/loki/CHANGELOG.md
  3. 2
      production/helm/loki/templates/compactor/statefulset-compactor.yaml
  4. 6
      production/helm/loki/templates/distributor/deployment-distributor.yaml
  5. 8
      production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml
  6. 4
      production/helm/loki/templates/index-gateway/statefulset-index-gateway.yaml
  7. 2
      production/helm/loki/templates/ingester/statefulset-ingester-zone-a.yaml
  8. 2
      production/helm/loki/templates/ingester/statefulset-ingester-zone-b.yaml
  9. 2
      production/helm/loki/templates/ingester/statefulset-ingester-zone-c.yaml
  10. 2
      production/helm/loki/templates/ingester/statefulset-ingester.yaml
  11. 4
      production/helm/loki/templates/pattern-ingester/statefulset-pattern-ingester.yaml
  12. 2
      production/helm/loki/templates/querier/deployment-querier.yaml
  13. 6
      production/helm/loki/templates/query-frontend/deployment-query-frontend.yaml
  14. 6
      production/helm/loki/templates/query-scheduler/deployment-query-scheduler.yaml
  15. 6
      production/helm/loki/templates/ruler/statefulset-ruler.yaml
  16. 14
      production/helm/loki/values.yaml

@ -2695,7 +2695,8 @@ null
"serviceAnnotations": {},
"serviceLabels": {},
"terminationGracePeriodSeconds": 30,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
@ -3015,6 +3016,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>distributor.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for distributor pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -3658,6 +3668,7 @@ false
},
"terminationGracePeriodSeconds": 60,
"tolerations": [],
"topologySpreadConstraints": [],
"useDefaultProxyURLs": true
}
</pre>
@ -3858,6 +3869,15 @@ false
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>enterpriseGateway.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for enterprise-gateway pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -4658,6 +4678,7 @@ null
"serviceLabels": {},
"terminationGracePeriodSeconds": 300,
"tolerations": [],
"topologySpreadConstraints": [],
"updateStrategy": {
"type": "RollingUpdate"
}
@ -4944,6 +4965,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>indexGateway.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for index-gateway pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -7686,7 +7716,8 @@ false
"serviceAnnotations": {},
"serviceLabels": {},
"terminationGracePeriodSeconds": 30,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
@ -8015,6 +8046,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>patternIngester.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for pattern ingester pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -8541,7 +8581,8 @@ Defaults to allow skew no more then 1 node
"serviceAnnotations": {},
"serviceLabels": {},
"terminationGracePeriodSeconds": 30,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
@ -8852,6 +8893,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>queryFrontend.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for query-frontend pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -8899,7 +8949,8 @@ null
"serviceAnnotations": {},
"serviceLabels": {},
"terminationGracePeriodSeconds": 30,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
@ -9111,6 +9162,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>queryScheduler.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for query-scheduler pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
@ -10008,7 +10068,8 @@ null
"serviceAnnotations": {},
"serviceLabels": {},
"terminationGracePeriodSeconds": 300,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
@ -10301,6 +10362,15 @@ null
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>ruler.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for ruler pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>

@ -13,6 +13,8 @@ Entries should include a reference to the pull request that introduced the chang
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
- [ENHANCEMENT] Expose Topology Spread Constraints in Helm chart templates and default values.
## 6.19.0
## 6.18.0

@ -48,7 +48,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.compactor.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}

@ -44,6 +44,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.distributor.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

@ -38,6 +38,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.enterpriseGateway.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ template "loki.serviceAccountName" . }}
{{- if .Values.enterpriseGateway.priorityClassName }}
priorityClassName: {{ .Values.enterpriseGateway.priorityClassName }}
@ -143,4 +149,4 @@ spec:
{{- if .Values.enterpriseGateway.extraVolumes }}
{{ toYaml .Values.enterpriseGateway.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

@ -132,6 +132,10 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexGateway.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexGateway.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

@ -69,7 +69,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}

@ -69,7 +69,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}

@ -69,7 +69,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}

@ -55,7 +55,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}

@ -131,6 +131,10 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.patternIngester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.patternIngester.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

@ -44,7 +44,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.querier.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}

@ -43,6 +43,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.queryFrontend.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

@ -41,6 +41,12 @@ spec:
{{- end }}
app.kubernetes.io/part-of: memberlist
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.queryScheduler.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

@ -38,6 +38,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.ruler.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

@ -1161,6 +1161,8 @@ enterpriseGateway:
affinity: {}
# -- Node selector for gateway Pods
nodeSelector: {}
# -- Topology Spread Constraints for enterprise-gateway pods
topologySpreadConstraints: []
# -- Tolerations for gateway Pods
tolerations: []
# -- Grace period to allow the gateway to shutdown before it is killed
@ -1973,6 +1975,8 @@ distributor:
maxSurge: 0
# -- Node selector for distributor pods
nodeSelector: {}
# -- Topology Spread Constraints for distributor pods
topologySpreadConstraints: []
# -- Tolerations for distributor pods
tolerations: []
# -- Adds the appProtocol field to the distributor service. This allows distributor to work with istio protocol selection.
@ -2181,6 +2185,8 @@ queryFrontend:
maxUnavailable: null
# -- Node selector for query-frontend pods
nodeSelector: {}
# -- Topology Spread Constraints for query-frontend pods
topologySpreadConstraints: []
# -- Tolerations for query-frontend pods
tolerations: []
# -- Adds the appProtocol field to the queryFrontend service. This allows queryFrontend to work with istio protocol selection.
@ -2244,6 +2250,8 @@ queryScheduler:
maxUnavailable: 1
# -- Node selector for query-scheduler pods
nodeSelector: {}
# -- Topology Spread Constraints for query-scheduler pods
topologySpreadConstraints: []
# -- Tolerations for query-scheduler pods
tolerations: []
# -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https"
@ -2308,6 +2316,8 @@ indexGateway:
maxUnavailable: null
# -- Node selector for index-gateway pods
nodeSelector: {}
# -- Topology Spread Constraints for index-gateway pods
topologySpreadConstraints: []
# -- Tolerations for index-gateway pods
tolerations: []
persistence:
@ -2796,6 +2806,8 @@ patternIngester:
terminationGracePeriodSeconds: 30
# -- Node selector for pattern ingester pods
nodeSelector: {}
# -- Topology Spread Constraints for pattern ingester pods
topologySpreadConstraints: []
# -- Tolerations for pattern ingester pods
tolerations: []
# -- Set the optional grpc service protocol. Ex: "grpc", "http2" or "https"
@ -2904,6 +2916,8 @@ ruler:
maxUnavailable: null
# -- Node selector for ruler pods
nodeSelector: {}
# -- Topology Spread Constraints for ruler pods
topologySpreadConstraints: []
# -- Tolerations for ruler pods
tolerations: []
# -- DNSConfig for ruler pods

Loading…
Cancel
Save