From 60071acfa101e5175880656a828e20873fea5fcf Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 Jan 2023 10:19:49 +0000 Subject: [PATCH] feat: add PodDisruptionBudget --- src/chartmuseum/templates/pdb.yaml | 15 +++++++++++++++ src/chartmuseum/values.yaml | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/chartmuseum/templates/pdb.yaml diff --git a/src/chartmuseum/templates/pdb.yaml b/src/chartmuseum/templates/pdb.yaml new file mode 100644 index 0000000..232ca1f --- /dev/null +++ b/src/chartmuseum/templates/pdb.yaml @@ -0,0 +1,15 @@ +{{- if .Values.podDisruptionBudget.enabled -}} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "chartmuseum.fullname" . }} + labels: + {{- include "chartmuseum.labels" . | nindent 4 }} + {{- include "chartmuseum.selectorLabels" . | nindent 4 }} +spec: + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + selector: + matchLabels: + {{- include "chartmuseum.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/src/chartmuseum/values.yaml b/src/chartmuseum/values.yaml index ad4ffab..f55d150 100644 --- a/src/chartmuseum/values.yaml +++ b/src/chartmuseum/values.yaml @@ -355,3 +355,12 @@ bearerAuth: secret: enabled: false publicKeySecret: chartmuseum-public-key + +# Configure Pod Distruption Budget +podDisruptionBudget: + # Specifies whether a PodDisruptionBudget should be created + enabled: false + # The minimum number of pods that must be available simultaneously. This is a pointer to distinguish between explicit zero and not specified. + minAvailable: 1 + # The maximum number of pods that may be unavailable simultaneously. This is a pointer to distinguish between explicit zero and not specified. + maxUnavailable: "" \ No newline at end of file