From c3e98954c9c3bcc899ac6285f63c29368e8e298d Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Fri, 9 Oct 2026 16:10:42 -0700 Subject: [PATCH 1/2] feat(chart): add startup probes to the API, frontend and database Without a startup probe, a slower start after an image update gets the container killed by its liveness probe instead of given time to boot. Each container now has a startup probe on the same endpoint as its readiness probe, as in quickstart-openshift. Refs #597 --- .../templates/api/templates/deployment.yml | 4 ++++ .../templates/database/templates/sfs.yml | 4 ++++ .../frontend/templates/deployment.yaml | 4 ++++ charts/pubcode/values.yaml | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/charts/pubcode/templates/api/templates/deployment.yml b/charts/pubcode/templates/api/templates/deployment.yml index a8b0fc6..5a04a3c 100644 --- a/charts/pubcode/templates/api/templates/deployment.yml +++ b/charts/pubcode/templates/api/templates/deployment.yml @@ -69,6 +69,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/templates/database/templates/sfs.yml b/charts/pubcode/templates/database/templates/sfs.yml index b2275b6..5c3da8d 100644 --- a/charts/pubcode/templates/database/templates/sfs.yml +++ b/charts/pubcode/templates/database/templates/sfs.yml @@ -79,6 +79,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/templates/frontend/templates/deployment.yaml b/charts/pubcode/templates/frontend/templates/deployment.yaml index 85c1057..5a7a05a 100644 --- a/charts/pubcode/templates/frontend/templates/deployment.yaml +++ b/charts/pubcode/templates/frontend/templates/deployment.yaml @@ -75,6 +75,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/values.yaml b/charts/pubcode/values.yaml index 8ab460f..924584e 100644 --- a/charts/pubcode/values.yaml +++ b/charts/pubcode/values.yaml @@ -48,6 +48,13 @@ api: memory: 100Mi limits: memory: 4Gi + startupProbe: + httpGet: + path: /api/pub-code/health + port: 3000 + scheme: HTTP + periodSeconds: 5 + failureThreshold: 30 readinessProbe: httpGet: path: /api/pub-code/health @@ -149,6 +156,13 @@ frontend: memory: 50Mi limits: memory: 4Gi + startupProbe: + httpGet: + path: /health + port: 3001 + scheme: HTTP + periodSeconds: 5 + failureThreshold: 30 readinessProbe: httpGet: path: /health @@ -267,6 +281,11 @@ database: memory: 150Mi limits: memory: 4Gi + startupProbe: + tcpSocket: + port: 27017 + periodSeconds: 10 + failureThreshold: 30 readinessProbe: tcpSocket: port: 27017 From af7bfb4ae870d7ba2b58a1fc33067fb0e786af7b Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Fri, 9 Oct 2026 16:17:13 -0700 Subject: [PATCH 2/2] fix(chart): give the API startup probe time for MongoDB to start The API binds its port only after connecting to MongoDB, whose startup probe allows 5 minutes, so the API now allows 6. Refs #597 --- charts/pubcode/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pubcode/values.yaml b/charts/pubcode/values.yaml index 924584e..6aac463 100644 --- a/charts/pubcode/values.yaml +++ b/charts/pubcode/values.yaml @@ -54,7 +54,7 @@ api: port: 3000 scheme: HTTP periodSeconds: 5 - failureThreshold: 30 + failureThreshold: 72 # 6 minutes: the API listens only after MongoDB, which may take 5, is up readinessProbe: httpGet: path: /api/pub-code/health