Skip to content

Commit

Permalink
nginx-operator: add pdb entry
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheu committed Jul 9, 2024
1 parent 5c0b741 commit feb7054
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/nginx-operator/templates/poddirruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if and .Values.podDisruptionBudget.enabled (gt (.Values.replicaCount|int) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "nginx-operator.fullname" . }}
labels:
{{- include "nginx-operator.labels" . | nindent 4 }}
spec:
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
selector:
matchLabels:
{{- include "nginx-operator.selectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/nginx-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000

podDisruptionBudget:
enabled: true
maxUnavailable: "10%"

securityContext: {}
# capabilities:
# drop:
Expand Down

0 comments on commit feb7054

Please sign in to comment.