From 1ca17544d8935cfbf372b0c5e4811cd55f45c1c0 Mon Sep 17 00:00:00 2001 From: James Reeve Date: Fri, 5 Jan 2024 15:26:35 -0500 Subject: [PATCH] feat(helm chart): add poddisruptionbudget --- .../templates/pdb.yaml | 16 ++++++++++++++++ deploy/cert-manager-ibm-cis-webhook/values.yaml | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 deploy/cert-manager-ibm-cis-webhook/templates/pdb.yaml diff --git a/deploy/cert-manager-ibm-cis-webhook/templates/pdb.yaml b/deploy/cert-manager-ibm-cis-webhook/templates/pdb.yaml new file mode 100644 index 0000000..3ca3b6a --- /dev/null +++ b/deploy/cert-manager-ibm-cis-webhook/templates/pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "cert-manager-ibm-cis-webhook.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "cert-manager-ibm-cis-webhook.name" . }} + chart: {{ include "cert-manager-ibm-cis-webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + maxUnavailable: 10% + selector: + matchLabels: + release: {{ .Release.Name }} +{{- end }} diff --git a/deploy/cert-manager-ibm-cis-webhook/values.yaml b/deploy/cert-manager-ibm-cis-webhook/values.yaml index 0354306..34b7294 100644 --- a/deploy/cert-manager-ibm-cis-webhook/values.yaml +++ b/deploy/cert-manager-ibm-cis-webhook/values.yaml @@ -34,6 +34,9 @@ service: type: ClusterIP port: 443 +pdb: + enabled: true + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little