Skip to content
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

feat: Allow configure podDisruptionBudget #15531

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ This is the generated reference for the Loki Helm Chart values.
"volumeClaimsEnabled": true
},
"podAnnotations": {},
"podDisruptionBudget": {
"create": true,
"maxUnavailable": 1
},
"podLabels": {},
"podManagementPolicy": "Parallel",
"priorityClassName": null,
Expand Down Expand Up @@ -2081,6 +2085,7 @@ null
<td>Pod Disruption Budget</td>
<td><pre lang="json">
{
"create": true,
"maxUnavailable": 1
}
</pre>
Expand Down Expand Up @@ -4390,6 +4395,24 @@ false
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>gateway.podDisruptionBudget.create</td>
<td>bool</td>
<td></td>
<td><pre lang="json">
true
</pre>
</td>
</tr>
<tr>
<td>gateway.podDisruptionBudget.maxUnavailable</td>
<td>int</td>
<td></td>
<td><pre lang="json">
1
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -9278,6 +9301,10 @@ false
"storageClass": null
},
"podAnnotations": {},
"podDisruptionBudget": {
"create": true,
"maxUnavailable": 1
},
"podLabels": {},
"podManagementPolicy": "Parallel",
"priorityClassName": null,
Expand Down Expand Up @@ -9838,6 +9865,7 @@ null
<td>Pod Disruption Budget</td>
<td><pre lang="json">
{
"create": true,
"maxUnavailable": 1
}
</pre>
Expand Down Expand Up @@ -11669,6 +11697,24 @@ true
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>write.podDisruptionBudget.create</td>
<td>bool</td>
<td></td>
<td><pre lang="json">
true
</pre>
</td>
</tr>
<tr>
<td>write.podDisruptionBudget.maxUnavailable</td>
<td>int</td>
<td></td>
<td><pre lang="json">
1
</pre>
</td>
</tr>
<tr>
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

- [FEATURE] Allow configure podDisruptionBudget

## 6.24.0

- [BUGFIX] Add conditional to include ruler config only if `ruler.enabled=true`
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.
type: application
appVersion: 3.3.2
version: 6.24.0
version: 6.24.1
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki

![Version: 6.24.0](https://img.shields.io/badge/Version-6.24.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.2](https://img.shields.io/badge/AppVersion-3.3.2-informational?style=flat-square)
![Version: 6.24.1](https://img.shields.io/badge/Version-6.24.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.2](https://img.shields.io/badge/AppVersion-3.3.2-informational?style=flat-square)

Helm chart for Grafana Loki and Grafana Enterprise Logs supporting both simple, scalable and distributed modes.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- if and $isSimpleScalable (gt (int .Values.backend.replicas) 1) (not .Values.read.legacyReadTarget ) }}
{{- if .Values.backend.PodDisruptionBudget.create}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand All @@ -11,5 +10,7 @@ spec:
selector:
matchLabels:
{{- include "loki.backendSelectorLabels" . | nindent 6 }}
maxUnavailable: 1
{{- with .Values.backend.PodDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . | default 1 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.chunksCache.enabled }}
{{- if .Values.chunksCache.PodDisruptionBudget.create }}
apiVersion: {{ include "loki.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand All @@ -12,5 +13,8 @@ spec:
matchLabels:
{{- include "loki.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: memcached-chunks-cache
maxUnavailable: 1
{{- end -}}
{{- with .Values.chunksCache.PodDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . | default 1 }}
{{- end}}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and .Values.gateway.enabled }}
{{- if and .Values.gateway.PodDisruptionBudget.create}}
{{- if or
(and (not .Values.gateway.autoscaling.enabled) (gt (int .Values.gateway.replicas) 1))
(and .Values.gateway.autoscaling.enabled (gt (int .Values.gateway.autoscaling.minReplicas) 1))
Expand All @@ -14,6 +15,8 @@ spec:
selector:
matchLabels:
{{- include "loki.gatewaySelectorLabels" . | nindent 6 }}
maxUnavailable: 1
{{- with .Values.gateway.PodDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . | default 1 }}
{{- end}}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- if and $isSimpleScalable (gt (int .Values.read.replicas) 1) }}
{{- if .Values.read.PodDisruptionBudget.create }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand All @@ -11,5 +10,7 @@ spec:
selector:
matchLabels:
{{- include "loki.readSelectorLabels" . | nindent 6 }}
maxUnavailable: 1
{{- with .Values.read.PodDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . | default 1 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.resultsCache.enabled }}
{{- if .Values.resultsCache.PodDisruptionBudget.create }}
apiVersion: {{ include "loki.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand All @@ -12,5 +13,8 @@ spec:
matchLabels:
{{- include "loki.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: memcached-results-cache
maxUnavailable: 1
{{- end -}}
{{- with .Values.resultsCache.PodDisruptionBudget.maxUnavailable}}
maxUnavailable: {{ . | default 1}}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
{{- if and $isSimpleScalable (gt (int .Values.write.replicas) 1) }}
{{- if .Values.write.PodDisruptionBudget.create }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand All @@ -11,5 +10,7 @@ spec:
selector:
matchLabels:
{{- include "loki.writeSelectorLabels" . | nindent 6 }}
maxUnavailable: 1
{{- with .Values.write.PodDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . | default 1 }}
{{- end }}
{{- end }}
Loading
Loading