Skip to content

Commit

Permalink
add pdb to chart
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethhealy committed Oct 15, 2024
1 parent da5a685 commit 0c742bf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions charts/platform/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.podDisruptionBudget.enabled}}
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "chart.fullname" . }}-pdb
namespace: {{ .Release.Namespace }}
labels:
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "chart.fullname" . }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

podDisruptionBudget:
# -- Enable pod disruption budget
enabled: false
# -- Maximum number of pods that can be unavailble
maxUnavailable: 1
# -- Minimum number of pods that must be available
minAvailable: 1

# -- Add ability for downstream chart to merge additional volumes
volumeTemplate: "platform.volumesEmpty.tpl"
# -- Additional volumes on the output Deployment definition.
Expand Down

0 comments on commit 0c742bf

Please sign in to comment.