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

chore(helm): implement readinessProbe and startupProbe for uwsgi container #10506

Merged
merged 3 commits into from
Nov 22, 2024
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
39 changes: 30 additions & 9 deletions helm/defectdojo/templates/django-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ spec:
value: '{{ .Values.django.nginx.tls.enabled }}'
- name: GENERATE_TLS_CERTIFICATE
value: '{{ .Values.django.nginx.tls.generateCertificate }}'
{{- if .Values.django.uwsgi.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /nginx_health
Expand All @@ -279,10 +280,13 @@ spec:
httpHeaders:
- name: Host
value: {{ .Values.host }}
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 6
{{- if .Values.django.uwsgi.livenessProbe.enabled }}
failureThreshold: {{ .Values.django.uwsgi.livenessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.django.uwsgi.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.django.uwsgi.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.django.uwsgi.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.django.uwsgi.livenessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.django.uwsgi.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /uwsgi_health
Expand All @@ -293,11 +297,28 @@ spec:
httpHeaders:
- name: Host
value: {{ .Values.host }}
failureThreshold: {{ .Values.django.uwsgi.livenessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.django.uwsgi.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.django.uwsgi.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.django.uwsgi.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.django.uwsgi.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.django.uwsgi.readinessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.django.uwsgi.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.django.uwsgi.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.django.uwsgi.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.django.uwsgi.readinessProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.django.uwsgi.startupProbe.enabled }}
startupProbe:
httpGet:
path: /uwsgi_health
port: http
{{- if .Values.django.nginx.tls.enabled }}
scheme: HTTPS
{{- end }}
httpHeaders:
- name: Host
value: {{ .Values.host }}
failureThreshold: {{ .Values.django.uwsgi.startupProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.django.uwsgi.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.django.uwsgi.startupProbe.periodSeconds }}
successThreshold: {{ .Values.django.uwsgi.startupProbe.successThreshold }}
timeoutSeconds: {{ .Values.django.uwsgi.startupProbe.timeoutSeconds }}
{{- end }}
resources:
{{- toYaml .Values.django.nginx.resources | nindent 10 }}
Expand Down
20 changes: 18 additions & 2 deletions helm/defectdojo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,29 @@ django:
tolerations: []
uwsgi:
livenessProbe:
# Enable liveness checks on uwsgi container. Those values are use on nginx readiness checks as well.
# Enable liveness checks on uwsgi container.
enabled: true
failureThreshold: 6
initialDelaySeconds: 3
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
# Enable readiness checks on uwsgi container.
enabled: true
failureThreshold: 6
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
startupProbe:
# Enable startup checks on uwsgi container.
enabled: true
failureThreshold: 30
initialDelaySeconds: 0
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
Expand Down
Loading