Skip to content

Commit

Permalink
Merge pull request #169 from Test-Automation-Engineer/feature/ON-pdb-…
Browse files Browse the repository at this point in the history
…for-worker

Add pdb for worker
  • Loading branch information
SilviaAmAm authored Jan 22, 2025
2 parents 8739489 + 181d0e2 commit be90103
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
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

0 comments on commit be90103

Please sign in to comment.