This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for pod disruption budget (#13215)
* add support for pod disruption budget Signed-off-by: Jay Howard <[email protected]> * support pod disruption budget parameters explicitly; bump minor version Signed-off-by: Jay Howard <[email protected]> * remove default values for minAvailable and maxUnavailable since they're mutually exclusive and neither is required Signed-off-by: Jay Howard <[email protected]>
- Loading branch information
1 parent
59cddbf
commit 4120bbf
Showing
4 changed files
with
33 additions
and
1 deletion.
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
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,23 @@ | ||
{{- if .Values.podDisruptionBudget.enabled -}} | ||
apiVersion: policy/v1beta1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
app: {{ template "kubernetes-dashboard.name" . }} | ||
chart: {{ template "kubernetes-dashboard.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "kubernetes-dashboard.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
|
||
spec: | ||
{{- if .Values.podDisruptionBudget.minAvailable }} | ||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} | ||
{{- end }} | ||
{{- if .Values.podDisruptionBudget.maxUnavailable }} | ||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
app: {{ template "kubernetes-dashboard.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
4120bbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaypatrickhoward Curious, doesn't this issue break node draining with the default replicaCount's == 1?
The nginx-ingress handles this differently, from it's README:
4120bbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test that specifically, but probably yes. By default the podDisruptionBudget is disabled, though, so unless a user explicitly enables it they should be okay. I think a PDB can also be created without setting a value for minAvailable or maxUnavailable; not sure what the behavior there is. Maybe in that case it's a NoOp?