Skip to content

Commit

Permalink
feat: Add PodDisruptionBudget to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafonseca committed Feb 7, 2025
1 parent 9dd9847 commit ab5aa28
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions charts/reports-server/templates/pod-disruption-budget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if eq .Values.pdb.enabled true }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "reports-server.fullname" . }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "reports-server.name" . }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- else if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/reports-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ autoscaling:
# -- Target Memory utilisation
targetMemoryUtilizationPercentage: ~


# -- Using a PDB is highly recommended for highly available deployments. Defaults to enabled. The default configuration doesn't prevent disruption when using a single replica
pdb:
# -- Enable PodDisruptionBudget
enabled: true
# -- minAvailable pods for PDB, cannot be used together with maxUnavailable
minAvailable: ~
# -- maxUnavailable pods for PDB, will take precedence over minAvailable if both are defined
maxUnavailable: 50%

# -- Node selector
nodeSelector: {}

Expand Down

0 comments on commit ab5aa28

Please sign in to comment.