From e13df93dd8dec00b2fe392a92bb68c3d2ae10a23 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Mon, 12 Jun 2023 15:08:05 +0200 Subject: [PATCH] feat: Allow scaledown --- charts/well-known/templates/pdb.yaml | 13 +++++++++++++ charts/well-known/values.yaml | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 charts/well-known/templates/pdb.yaml diff --git a/charts/well-known/templates/pdb.yaml b/charts/well-known/templates/pdb.yaml new file mode 100644 index 0000000..7f5985b --- /dev/null +++ b/charts/well-known/templates/pdb.yaml @@ -0,0 +1,13 @@ +{{- if and (gt (.Values.replicaCount | int) 1) (.Values.podDisruptionBudget) }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "well-known.fullname" . }} + labels: + {{- include "well-known.labels" . | nindent 4 }} +spec: + {{ toYaml .Values.podDisruptionBudget }} + selector: + matchLabels: + {{- include "well-known.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/well-known/values.yaml b/charts/well-known/values.yaml index 9c19fda..f95f2ad 100644 --- a/charts/well-known/values.yaml +++ b/charts/well-known/values.yaml @@ -33,6 +33,8 @@ webserver: config: accessLogEnabled: false +podDisruptionBudget: + maxUnavailable: 1 imagePullSecrets: [] nameOverride: "" @@ -47,7 +49,8 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" -podAnnotations: {} +podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" podSecurityContext: {} # fsGroup: 2000