File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{{- $operator := (splitList " ." .operatorName | first) -}}
2+ {{` {{` }}- if .Values.pdb.enabled {{` }}` }}
23{{` {{` }}- if ge (int .Values.replicaCount ) 2 {{` }}` }}
34apiVersion: policy/v1
45kind: PodDisruptionBudget
56metadata:
67 name: {{` {{` }} include " {{ $operator }}.fullname" . {{` }}` }}
8+ {{` {{` }}- with .Values.pdb.annotations {{` }}` }}
9+ annotations:
10+ {{` {{` }}- toYaml . | nindent 4 {{` }}` }}
11+ {{` {{` }}- end {{` }}` }}
712 labels:
813 {{` {{` }}- include " {{ $operator }}.labels" . | nindent 4 {{` }}` }}
14+ {{` {{` }}- with .Values.pdb.labels {{` }}` }}
15+ {{` {{` }}- toYaml . | nindent 4 {{` }}` }}
16+ {{` {{` }}- end {{` }}` }}
917spec:
10- minAvailable: 1
18+ {{` {{` }}- if .Values.pdb.maxUnavailable {{` }}` }}
19+ maxUnavailable: {{` {{` }} .Values.pdb.maxUnavailable {{` }}` }}
20+ {{` {{` }}- else }}
21+ minAvailable: {{` {{` }} .Values.pdb.minAvailable {{` }}` }}
22+ {{` {{` }}- end {{` }}` }}
1123 selector:
1224 matchLabels:
1325 {{` {{` }}- include " {{ $operator }}.selectorLabels" . | nindent 6 {{` }}` }}
1426{{` {{` }}- end {{` }}` }}
27+ {{` {{` }}- end {{` }}` }}
Original file line number Diff line number Diff line change @@ -62,6 +62,18 @@ resources:
6262 # -- Memory request
6363 memory: 128Mi
6464
65+ pdb:
66+ # -- Whether to create a PodDisruptionBudget for the webhook
67+ enabled: true
68+ # -- Labels to set on the PodDisruptionBudget
69+ labels: {}
70+ # -- Annotations to set on the PodDisruptionBudget
71+ annotations: {}
72+ # -- Number of pods that are available after eviction as number or percentage (e.g. 50%)
73+ minAvailable: " 1"
74+ # -- Number of pods that are unavailable after eviction as number or percentage (e.g : 50%); has higher precedence over ` pdb.minAvailable`
75+ maxUnavailable: " "
76+
6577{{- if or .validatingWebhookEnabled .mutatingWebhookEnabled }}
6678
6779service:
You can’t perform that action at this time.
0 commit comments