Skip to content

Commit

Permalink
Readiness + Startup probes (#804)
Browse files Browse the repository at this point in the history
* readiness

* deploy

* readiness

* readiness

* readiness

* readiness

* readiness

* readiness

* readiness

* readiness

* readiness

* readiness

* disable

* liveness

* readiness

* startup

* startup

* startup

* cleanup
  • Loading branch information
james-otten authored Jan 18, 2025
1 parent 832eb2e commit af6f44f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
42 changes: 31 additions & 11 deletions infra/helm/meshdb/templates/meshweb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,38 @@ spec:
mountPath: /opt/meshdb/static
{{ if eq .Values.meshweb.liveness_probe "true" }}
livenessProbe:
exec:
command:
- curl
- http://127.0.0.1:{{ .Values.meshweb.port }}/api/v1
periodSeconds: 3
initialDelaySeconds: 4
timeoutSeconds: 3
{{ end }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
exec:
command:
- bash
- -c
- 'curl http://127.0.0.1:{{ .Values.meshweb.port }}/api/v1/ -H "Host: db.nycmesh.net" -s | grep meshin'
periodSeconds: 10
initialDelaySeconds: 30
timeoutSeconds: 3
{{ end }}
{{ if eq .Values.meshweb.readiness_probe "true" }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
exec:
command:
- bash
- -c
- 'curl http://127.0.0.1:{{ .Values.meshweb.port }}/api/v1/ -H "Host: db.nycmesh.net" -s | grep meshin'
periodSeconds: 3
initialDelaySeconds: 10
timeoutSeconds: 3
{{ end }}
{{ if eq .Values.meshweb.startup_probe "true" }}
startupProbe:
exec:
command:
- bash
- -c
- 'curl http://127.0.0.1:{{ .Values.meshweb.port }}/api/v1/ -H "Host: db.nycmesh.net" -s | grep meshin'
periodSeconds: 3
initialDelaySeconds: 20
timeoutSeconds: 3
failureThreshold: 20
{{ end }}
resources:
{{- toYaml .Values.meshweb.resources | nindent 12 }}
volumes:
Expand Down
2 changes: 2 additions & 0 deletions infra/helm/meshdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ meshweb:
static_pvc_name: "meshdb-static-pvc"
static_pvc_size: "1Gi"
liveness_probe: "true"
readiness_probe: "true"
startup_probe: "true"
image:
repository: willnilges/meshdb
tag: main
Expand Down

0 comments on commit af6f44f

Please sign in to comment.