feat(ifc file importer): add healthcheck endpoint (#5232)

* Serve path `/healthz`
* Include readiness and startup probes
This commit is contained in:
Iain Sproat
2025-08-14 11:33:54 +01:00
committed by GitHub
parent 82caecb841
commit 4d8d93f75e
5 changed files with 78 additions and 9 deletions
@@ -37,9 +37,42 @@ spec:
containerPort: 9093
protocol: TCP
startupProbe:
periodSeconds: 10
failureThreshold: 18 # 10 * 18 = 180s to startup
timeoutSeconds: 3
{{- if .Values.featureFlags.nextGenFileImporterEnabled }}
httpGet:
path: /healthz
port: 9080
{{- else }}
exec:
command:
- /usr/bin/node
- -e
- "process.exit((Date.now() - require('fs').readFileSync('/tmp/last_successful_query', 'utf8') > 25 * 60 * 1000) ? 1 : 0)"
{{- end }}
livenessProbe:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 3
{{- if .Values.featureFlags.nextGenFileImporterEnabled }}
httpGet:
path: /healthz
port: 9080
{{- else }}
exec:
command:
- /usr/bin/node
- -e
- "process.exit((Date.now() - require('fs').readFileSync('/tmp/last_successful_query', 'utf8') > 25 * 60 * 1000) ? 1 : 0)"
{{- end }}
readinessProbe:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 3
{{- if .Values.featureFlags.nextGenFileImporterEnabled }}
httpGet:
path: /healthz
@@ -31,13 +31,29 @@ spec:
containerPort: 9093
protocol: TCP
# TODO: Enable health checks
# livenessProbe:
# initialDelaySeconds: 60
# periodSeconds: 60
# httpGet:
# path: /healthz
# port: 9080
startupProbe:
periodSeconds: 10
failureThreshold: 18 # 10 * 18 = 180s to startup
timeoutSeconds: 3
httpGet:
path: /healthz
port: 9080
livenessProbe:
initialDelaySeconds: 60
periodSeconds: 60
timeoutSeconds: 3
httpGet:
path: /healthz
port: 9080
readinessProbe:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 3
httpGet:
path: /healthz
port: 9080
resources:
{{- with .Values.ifc_import_service.requests }}