-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add optional PodDisruptionBudget (#272)
Adds support for creating a PodDisruptionBudget. This will configure K8s to always attempt to have either minAvailable pods running, or no more than minUnavailable pods unavailable. This will prevent an outage in the event of nodes running the pods being taken out of service for maintenance.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.podDisruptionBudget.enabled -}} | ||
apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: {{ template "pihole.fullname" . }}-pdb | ||
labels: | ||
app: {{ template "pihole.name" . }} | ||
chart: {{ template "pihole.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
{{- if .Values.podDisruptionBudget.minAvailable }} | ||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} | ||
{{- end }} | ||
{{- if .Values.podDisruptionBudget.maxUnavailable }} | ||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
app: {{ template "pihole.name" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters