Skip to content

Commit 85fe05a

Browse files
authored
feat: add pdb for making pixxel services fault tolerant (#116)
* feat: add pdb for making pixxel services fault tolerant * fix: added additional pod labels to deployment so that pdb can target only deployment pods * fix: replaced to non org specific labels * feat: bump in minor version for new feature addition * feat: added min available condition, also added a condition such that pdb can only attach to deployment whose replica count > 1, added flag to switch on/off pdb * fix: removed minAvailable
1 parent 7785f08 commit 85fe05a

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

stable/app/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.5.4
18+
version: 0.6.0

stable/app/templates/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ spec:
2222
{{- end }}
2323
labels:
2424
{{- include "app.selectorLabels" . | nindent 8 }}
25+
app.kubernetes.io/component: "deployment"
2526
spec:
2627
{{- with .Values.imagePullSecrets }}
2728
imagePullSecrets:
@@ -113,4 +114,4 @@ spec:
113114
{{- with .Values.tolerations }}
114115
tolerations:
115116
{{- toYaml . | nindent 8 }}
116-
{{- end }}
117+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if and .Values.pdb.enabled (gt .Values.replicaCount 1) }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: "{{ template "app.fullname" . }}-pdb"
6+
spec:
7+
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
8+
selector:
9+
matchLabels:
10+
{{- include "app.selectorLabels" . | nindent 6 }}
11+
app.kubernetes.io/component: "deployment"
12+
{{- end }}

stable/app/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ resources: {}
7878
# -- cpu: 100m
7979
# -- memory: 128Mi
8080

81+
pdb:
82+
enabled: false
83+
maxUnavailable: 1
84+
8185
nodeSelector: {}
8286

8387
tolerations: []

0 commit comments

Comments
 (0)