Skip to content

feat(chart): add startup probes to the API, frontend and database - #668

Merged
DerekRoberts merged 3 commits into
mainfrom
feat/chart-startup-probes
Oct 11, 2026
Merged

DerekRoberts merged 3 commits into
mainfrom
feat/chart-startup-probes

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The chart's containers have no startup probes, so if an auto-merged image update makes a container start more slowly, its liveness probe kills it before it finishes booting.

Refs #597

Changes

  • The API, frontend and database templates render startupProbe when a container sets one. This uses the same pass-through pattern as the existing readiness and liveness probes.

  • values.yaml sets a startup probe on each container, using the same endpoint as its readiness probe:

    Container Probe Startup allowance
    API /api/pub-code/health on port 3000 5s × 72
    Frontend /health on port 3001 5s × 30
    Database TCP 27017 10s × 30

    The frontend timing matches quickstart-openshift. MongoDB gets up to 5 minutes, since it can take longer to start on a large volume. The API gets 6 minutes, because it opens its port only after connecting to MongoDB.

  • Readiness and liveness probes are unchanged; Kubernetes starts them once the startup probe succeeds.

helm lint passes and helm template renders all three probes. This PR's deployment exercises them in CI.


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

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
Copilot AI balanced review requested due to automatic review settings October 9, 2026 23:10
@DerekRoberts DerekRoberts self-assigned this Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The API startup allowance is shorter than the database allowance despite API startup depending on MongoDB.

1 open finding
What changed in this PR

Adds configurable startup probes to prevent premature container restarts during boot.

Changes:

  • Renders startup probes for API, frontend, and database containers.
  • Configures HTTP and TCP startup checks with component-specific allowances.
File Description
charts/​pubcode/​values.yaml Defines startup probe settings.
charts/​pubcode/​templates/​api/​templates/​deployment.yml Renders API startup probes.
charts/​pubcode/​templates/​frontend/​templates/​deployment.yaml Renders frontend startup probes.
charts/​pubcode/​templates/​database/​templates/​sfs.yml Renders database startup probes.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread charts/pubcode/values.yaml Outdated
The API binds its port only after connecting to MongoDB, whose startup probe allows 5 minutes, so the API now allows 6.

Refs #597
@DerekRoberts DerekRoberts mentioned this pull request Oct 9, 2026
3 of 8 tasks
@DerekRoberts
DerekRoberts merged commit 2efca63 into main Oct 11, 2026
16 of 17 checks passed
@DerekRoberts
DerekRoberts deleted the feat/chart-startup-probes branch October 11, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants