Skip to content

feat: expose topologySpreadConstraints for admin-api pods #14995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ This is the generated reference for the Loki Helm Chart values.
"type": "RollingUpdate"
},
"terminationGracePeriodSeconds": 60,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
Expand Down Expand Up @@ -280,6 +281,15 @@ This is the generated reference for the Loki Helm Chart values.
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>adminApi.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for admin-api pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.adminApi.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ template "loki.serviceAccountName" . }}
{{- if .Values.adminApi.priorityClassName }}
priorityClassName: {{ .Values.adminApi.priorityClassName }}
Expand Down Expand Up @@ -167,4 +173,4 @@ spec:
path: CAs/public.crt
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ adminApi:
affinity: {}
# -- Node selector for admin-api Pods
nodeSelector: {}
# -- Topology Spread Constraints for admin-api pods
topologySpreadConstraints: []
# -- Tolerations for admin-api Pods
tolerations: []
# -- Grace period to allow the admin-api to shutdown before it is killed
Expand Down
Loading