Skip to content

Commit 64db414

Browse files
committed
fix: add pdb
1 parent ba15994 commit 64db414

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

charts/oblik/templates/pdb.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.pdb.enabled }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: oblik
6+
annotations: {{ .Values.annotations | toYaml | nindent 4 }}
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: oblik
11+
{{- if .Values.pdb.minAvailable }}
12+
minAvailable: {{ .Values.pdb.minAvailable }}
13+
{{- end }}
14+
{{- if .Values.pdb.maxUnavailable }}
15+
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
16+
{{- end }}
17+
{{- end }}

charts/oblik/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,11 @@ existingSecret:
2222

2323
resources: {}
2424

25+
# Pod Disruption Budget configuration
26+
pdb:
27+
enabled: true
28+
# Either minAvailable or maxUnavailable should be set, not both
29+
minAvailable: 2 # Ensure at least 2 pods are always available
30+
# maxUnavailable: 1 # Alternative: allow at most 1 pod to be unavailable
31+
2532
annotations: {}

0 commit comments

Comments
 (0)