Skip to content

Commit

Permalink
Add PodDisruptionBudget resource
Browse files Browse the repository at this point in the history
  • Loading branch information
martinschneppenheim committed Aug 9, 2021
1 parent 7381f6b commit 01843a9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions charts/kminion/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.podDisruptionBudget }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "kminion.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "kminion.labels" . | nindent 4}}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "kminion.selectorLabels" . | nindent 6}}
{{- end }}
6 changes: 6 additions & 0 deletions charts/kminion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ podSecurityContext:
runAsUser: 99
fsGroup: 99

## See `kubectl explain poddisruptionbudget.spec` for more
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget:
maxUnavailable: 1
# minAvailable: 1

securityContext: {}
# capabilities:
# drop:
Expand Down

0 comments on commit 01843a9

Please sign in to comment.