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