Skip to content

feat(helm): add HPA behavior and startup probe#2798

Merged
alepane21 merged 6 commits intowundergraph:mainfrom
AdrienPoupa:feat/add-hpa-parameters
Apr 28, 2026
Merged

feat(helm): add HPA behavior and startup probe#2798
alepane21 merged 6 commits intowundergraph:mainfrom
AdrienPoupa:feat/add-hpa-parameters

Conversation

@AdrienPoupa
Copy link
Copy Markdown
Contributor

@AdrienPoupa AdrienPoupa commented Apr 27, 2026

This adds two new options in the router's HPA Helm Chart:

  • autoscaling.behavior to allow configuring the the HPA scaling behavior
  • probes.startup to configure startup probe

This is useful to fine tune HPA policies and allows for a cooldown period before applying HPA policies. I need this to ignore the initial CPU/memory spike caused by the PQL manifest cache warmup.

Summary by CodeRabbit

  • New Features

    • Added configurable startup probe support to enable container startup health checks via chart values.
    • Added configurable autoscaling behavior to tune Horizontal Pod Autoscaler's scale-up/scale-down policies.
  • Documentation

    • Updated chart values documentation with descriptions and examples for the new startup probe and autoscaling behavior options.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

Add two optional, opt-in keys to the router chart:

- autoscaling.behavior: passthrough to HPA spec.behavior, allowing
  users to configure scaleUp/scaleDown stabilization windows and
  policies. Useful when the router does meaningful startup work
  (e.g. persisted-operations manifest cache warmup) which would
  otherwise spike CPU/memory and cause the HPA to over-provision
  on deploys.

- probes.startup: passthrough to the container's startupProbe.
  Lets operators give the router additional startup grace without
  loosening liveness/readiness defaults.

Both default to {} and render nothing when unset, so existing
installations are unaffected.
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds optional HPA autoscaling.behavior and container probes.startup settings to the router Helm chart; updates templates to conditionally render these sections and updates README and values defaults (both new settings default to empty objects).

Changes

Cohort / File(s) Summary
Documentation & Defaults
helm/cosmo/charts/router/README.md, helm/cosmo/charts/router/values.yaml
Documented autoscaling.behavior and probes.startup; added empty-object stubs and an example/commented structure for HPA behavior.
Deployment Template
helm/cosmo/charts/router/templates/deployment.yaml
Added conditional rendering of container startupProbe when .Values.probes.startup is set.
HPA Template
helm/cosmo/charts/router/templates/hpa.yaml
Added conditional rendering of spec.behavior populated from .Values.autoscaling.behavior when provided.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: adding HPA behavior configuration and startup probe support to the Helm chart.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread helm/cosmo/charts/router/values.yaml
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
helm/cosmo/charts/router/values.yaml (1)

195-195: Add an example/comment for probes.startup for parity with behavior and the other probes.

Unlike readiness and liveness above (which show concrete httpGet/initialDelaySeconds config) and unlike the new autoscaling.behavior (which now ships an inline example), probes.startup: {} is bare. Since the stated motivation of this PR is to grant additional startup grace for PQL manifest cache warmup, a commented example would make the intended usage discoverable for operators and consistent with the rest of the file.

📝 Suggested example comment
-  startup: {}
+  # -- Configure startup probe. When unset, no startupProbe is rendered.
+  # Useful to grant additional startup grace (e.g. while the PQL manifest cache warms up)
+  # so that the liveness probe does not kill the pod prematurely.
+  # Example:
+  # startup:
+  #   httpGet:
+  #     path: /health/live
+  #     port: http
+  #   initialDelaySeconds: 10
+  #   periodSeconds: 10
+  #   failureThreshold: 30
+  startup: {}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@helm/cosmo/charts/router/values.yaml` at line 195, Add a commented example
for probes.startup to mirror the existing readiness/liveness examples and the
new autoscaling.behavior snippet: show a sample startupProbe configuration
(e.g., httpGet path, port, and
initialDelaySeconds/periodSeconds/failureThreshold) as commented YAML under the
probes.startup: {} key so operators can see how to increase startup grace for
PQL manifest cache warmup; update the probes.startup block to include this
inline commented example and ensure naming matches the existing
probes.readiness/probes.liveness style for consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@helm/cosmo/charts/router/values.yaml`:
- Line 195: Add a commented example for probes.startup to mirror the existing
readiness/liveness examples and the new autoscaling.behavior snippet: show a
sample startupProbe configuration (e.g., httpGet path, port, and
initialDelaySeconds/periodSeconds/failureThreshold) as commented YAML under the
probes.startup: {} key so operators can see how to increase startup grace for
PQL manifest cache warmup; update the probes.startup block to include this
inline commented example and ensure naming matches the existing
probes.readiness/probes.liveness style for consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29f05e4d-c820-4fa2-918e-b61dbed7379d

📥 Commits

Reviewing files that changed from the base of the PR and between bccc3c6 and 5992dc2.

📒 Files selected for processing (1)
  • helm/cosmo/charts/router/values.yaml

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
helm/cosmo/charts/router/values.yaml (1)

146-147: Add Helm-docs description markers for the new keys.

At Line 146 and Line 195, adding # -- description comments (same style as adjacent keys) will keep generated README parameter descriptions populated and consistent.

Suggested diff
 autoscaling:
   enabled: false
   minReplicas: 1
   maxReplicas: 100
   targetCPUUtilizationPercentage: 80
   # targetMemoryUtilizationPercentage: 80
+  # -- Configure HPA behavior (`spec.behavior`) for scaleUp/scaleDown policies and stabilization windows.
   behavior:
     # Configures the HPA scaling behavior. When unset, Kubernetes applies its defaults
     # (300s scale-down stabilization window, no scale-up window).
     # Example of a custom scale up and scale down behavior:
@@
 probes:
   # -- Configure readiness probe
   readiness:
@@
   # -- Configure liveness probe
   liveness:
@@
+  # -- Configure startup probe
   startup: {}

Also applies to: 195-195

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@helm/cosmo/charts/router/values.yaml` around lines 146 - 147, Add Helm-docs
description markers for the new Helm chart values so generated README parameter
descriptions remain populated: insert the comment marker "# --" above the new
top-level value key "behavior" (and likewise add the same "# --" comment for the
other new key at the spot around line 195) following the same style as adjacent
keys, ensuring the marker sits immediately above each key so helm-docs picks up
the parameter descriptions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@helm/cosmo/charts/router/values.yaml`:
- Around line 146-147: Add Helm-docs description markers for the new Helm chart
values so generated README parameter descriptions remain populated: insert the
comment marker "# --" above the new top-level value key "behavior" (and likewise
add the same "# --" comment for the other new key at the spot around line 195)
following the same style as adjacent keys, ensuring the marker sits immediately
above each key so helm-docs picks up the parameter descriptions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3787c06-9045-4100-a66a-cee97404c990

📥 Commits

Reviewing files that changed from the base of the PR and between 5992dc2 and 4b80ba1.

📒 Files selected for processing (1)
  • helm/cosmo/charts/router/values.yaml

@alepane21 alepane21 requested a review from pepol April 28, 2026 07:37
@alepane21 alepane21 merged commit 1d1b39b into wundergraph:main Apr 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants