Skip to content

Commit

Permalink
⚗️ [#165] Use OAB to test new liveness probe
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Jan 15, 2025
1 parent 9726bee commit 243d96c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
7 changes: 5 additions & 2 deletions charts/openarchiefbeheer/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.3.14
digest: sha256:9a575d102b6aa617223725968198a70072cee90595377df08ae62cef7c32cf4a
generated: "2023-02-28T13:57:35.331737607+01:00"
- name: maykinhelmlib
repository: file://../maykinhelmlib
version: 0.1.0
digest: sha256:6bba46f6db2fb930fa5a94723b5c1cdde49ada53fd94bb78e6787b46ee63440b
generated: "2025-01-15T12:10:10.907988903+01:00"
5 changes: 4 additions & 1 deletion charts/openarchiefbeheer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ dependencies:
version: 17.3.14
repository: https://charts.bitnami.com/bitnami
tags:
- redis
- redis
- name: maykinhelmlib
version: 0.1.0
repository: file://../maykinhelmlib
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if .Values.worker.livenessProbe.enabled }}
{{- include "maykinhelmlib.celeryLivenessConfigmap" . -}}
{{- end }}
1 change: 1 addition & 0 deletions charts/openarchiefbeheer/templates/configmap-celery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "maykinhelmlib.celeryEnvConfigmap" . -}}
13 changes: 13 additions & 0 deletions charts/openarchiefbeheer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ spec:
name: {{ .Values.existingSecret | default (include "openarchiefbeheer.fullname" .) }}
- configMapRef:
name: {{ include "openarchiefbeheer.fullname" . }}
- configMapRef:
name: {{ include "project.fullname" . }}-worker-{{ .Values.worker.label | default "celery" }}
env:
{{- if .Values.extraEnvVars }}
{{- include "openarchiefbeheer.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
Expand Down Expand Up @@ -300,6 +302,11 @@ spec:
{{- if .Values.extraVolumeMounts }}
{{- include "openarchiefbeheer.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 12 }}
{{- end }}
{{- if .Values.worker.livenessProbe.enabled }}
- name: liveness
mountPath: /app/liveness/
readOnly: true
{{- end }}
volumes:
- name: media
persistentVolumeClaim:
Expand All @@ -311,6 +318,12 @@ spec:
{{- if .Values.extraVolumes }}
{{- include "openarchiefbeheer.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $ ) | nindent 8 }}
{{- end }}
{{- if .Values.worker.livenessProbe.enabled }}
- name: liveness
configMap:
name: {{ include "project.fullname" . }}-celery-liveness
defaultMode: 0555
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
10 changes: 6 additions & 4 deletions charts/openarchiefbeheer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ extraEnvVars: []
extraVolumes: []
extraVolumeMounts: []

pythonAppName: openarchiefbeheer
settings:
allowedHosts: ""
djangoSettingsModule: openarchiefbeheer.conf.docker
Expand Down Expand Up @@ -251,17 +252,18 @@ settings:
frontendUrl: ""

worker:
label: "1"
name: ""
queueName: ""
replicaCount: 1
concurrency: 4
podLabels: {}
resources: {}
livenessProbe:
enabled: false
enabled: true
exec:
command:
- /bin/sh
- -c
- celery --workdir src --app openarchiefbeheer.celery inspect --destination celery@${HOSTNAME} active
- /app/liveness/liveness-probe.sh
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
Expand Down

0 comments on commit 243d96c

Please sign in to comment.