diff --git a/charts/wiki/templates/pdb.yaml b/charts/wiki/templates/pdb.yaml new file mode 100644 index 000000000..81398dd4d --- /dev/null +++ b/charts/wiki/templates/pdb.yaml @@ -0,0 +1,18 @@ +{{- if .Values.poddisruptionbudget.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "wiki.fullname" . }} + labels: + {{- include "wiki.labels" . | nindent 4 }} +spec: + {{- with .Values.poddisruptionbudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.poddisruptionbudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: {{ include "wiki.fullname" . }} +{{- end }} diff --git a/charts/wiki/values.yaml b/charts/wiki/values.yaml index 5a1510cea..4d2c52592 100644 --- a/charts/wiki/values.yaml +++ b/charts/wiki/values.yaml @@ -66,3 +66,7 @@ autoscaling: nodeSelector: {} tolerations: [] affinity: {} +poddisruptionbudget: + enabled: false + minAvailable: 1 + maxUnavailable: 1