diff --git a/charts/platform/templates/poddisruptionbudget.yaml b/charts/platform/templates/poddisruptionbudget.yaml new file mode 100644 index 0000000..876dd98 --- /dev/null +++ b/charts/platform/templates/poddisruptionbudget.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.podDisruptionBudget.enabled}} +--- +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ include "chart.fullname" . }}-pdb + namespace: {{ .Release.Namespace }} + labels: +spec: +{{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "chart.fullname" . }} +{{- end }} \ No newline at end of file diff --git a/charts/platform/values.yaml b/charts/platform/values.yaml index f210462..694906e 100644 --- a/charts/platform/values.yaml +++ b/charts/platform/values.yaml @@ -119,6 +119,14 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 +podDisruptionBudget: + # -- Enable pod disruption budget + enabled: false + # -- Maximum number of pods that can be unavailble + maxUnavailable: 1 + # -- Minimum number of pods that must be available + minAvailable: 1 + # -- Add ability for downstream chart to merge additional volumes volumeTemplate: "platform.volumesEmpty.tpl" # -- Additional volumes on the output Deployment definition.