Skip to content

Commit

Permalink
feat(helm): add PodDisruptionBudget (#793)
Browse files Browse the repository at this point in the history
when replicaCount > 1 or autoscaling is enabled with minReplica > 1
  • Loading branch information
jfcoz committed Aug 2, 2023
1 parent 7b09641 commit b8147ad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/mercure/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if or (and .Values.autoscaling.enabled (gt (.Values.autoscaling.minReplicas | int) 1)) (and (not .Values.autoscaling.enabled) (gt (.Values.replicaCount | int) 1)) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "mercure.fullname" . }}
labels:
{{- include "mercure.labels" . | nindent 4 }}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{- include "mercure.selectorLabels" . | nindent 6 }}
{{- end }}

0 comments on commit b8147ad

Please sign in to comment.