Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pdb for worker #169

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/opennotificaties/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.8.0-beta.0 (2025-22-01)
- [#169] Add pdb for worker

## 1.7.0-beta.0 (2025-10-01)

- [#148] Replace the worker liveness probe with the `celery inspect active` command. This should detect when a worker is down and should not interrupt long running tasks.
Expand Down
2 changes: 1 addition & 1 deletion charts/opennotificaties/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: opennotificaties
description: API voor het routeren van notificaties

type: application
version: 1.7.0-beta.0
version: 1.8.0-beta.0
appVersion: latest

dependencies:
Expand Down
4 changes: 3 additions & 1 deletion charts/opennotificaties/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ API voor het routeren van notificaties
| worker.livenessProbe.successThreshold | int | `1` | |
| worker.livenessProbe.timeoutSeconds | int | `15` | |
| worker.maxWorkerLivenessDelta | string | `""` | |
| worker.pdb.create | bool | `false` | |
| worker.pdb.maxUnavailable | string | `""` | |
| worker.pdb.minAvailable | int | `1` | |
| worker.podLabels | object | `{}` | |
| worker.replicaCount | int | `2` | |
| worker.resources | object | `{}` | |

21 changes: 21 additions & 0 deletions charts/opennotificaties/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,25 @@ spec:
selector:
matchLabels:
{{- include "opennotificaties.selectorLabels" . | nindent 6 }}
{{- end }}

---
{{- if .Values.worker.pdb.create }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "opennotificaties.workerFullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "opennotificaties.workerLabels" . | nindent 4 }}
spec:
{{- if .Values.worker.pdb.minAvailable }}
minAvailable: {{ .Values.worker.pdb.minAvailable }}
{{- end }}
{{- if .Values.worker.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.worker.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "opennotificaties.workerSelectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/opennotificaties/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ worker:
maxReplicas: 100
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
pdb:
create: false
minAvailable: 1
maxUnavailable: ""

flower:
enabled: false
Expand Down
Loading