Skip to content

Commit

Permalink
feat: updated selector labels for deployment to make pdb compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
punit-kulal committed Jul 31, 2024
1 parent 4af085d commit c418452
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions stable/app/templates/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
template:
metadata:
labels:
app.kubernetes.io/type: cronjob
{{- $appSelectorLabels | nindent 12 }}
spec:
containers:
Expand Down
2 changes: 2 additions & 0 deletions stable/app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/type: deployment
{{- include "app.selectorLabels" . | nindent 6 }}
template:
metadata:
Expand All @@ -21,6 +22,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app.kubernetes.io/type: deployment
{{- include "app.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down
3 changes: 2 additions & 1 deletion stable/app/templates/migration-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ spec:
template:
metadata:
labels:
{{- include "app.selectorLabels" . | nindent 8 }}
app.kubernetes.io/type: job
{{- include "app.selectorLabels" . | nindent 8 }}
spec:
restartPolicy: Never
containers:
Expand Down
1 change: 1 addition & 0 deletions stable/app/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ spec:
{{- end }}
selector:
matchLabels:
app.kubernetes.io/type: deployment
{{- include "app.selectorLabels" . | nindent 6 }}
{{- end }}
1 change: 1 addition & 0 deletions stable/app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ spec:
name: {{ $port.name }}
{{- end }}
selector:
app.kubernetes.io/type: deployment
{{- include "app.selectorLabels" . | nindent 4 }}

0 comments on commit c418452

Please sign in to comment.