Skip to content

chart: make replicas, livenessProbe, and readinessProbe configurable#1644

Open
teemow wants to merge 1 commit into
mainfrom
configurable-replicas-strategy-probes
Open

chart: make replicas, livenessProbe, and readinessProbe configurable#1644
teemow wants to merge 1 commit into
mainfrom
configurable-replicas-strategy-probes

Conversation

@teemow

@teemow teemow commented May 9, 2026

Copy link
Copy Markdown
Member

The chart hardcoded replicas: 1 and the liveness/readiness probe parameters in the Deployment template, with no values knob to override them.

That worked when Backstage installs were small and a 10s initialDelaySeconds liveness was generous, but plugin-heavy installs (BWI portal, etc.) take 60-120s to register all plugins on a cold start and get killed mid-init by the default liveness. Operators working around this had no choice but to hand-patch the live Deployment after every chart upgrade -- which is reverted on the next HelmRelease reconcile.

Changes

  • Add replicas (integer, default 1). Same default as before; only safe to bump when backing the install with an RWX volume or external Postgres database. Documented on the value.
  • Add readinessProbe (object, default {}). Merged over the chart's default readiness probe via mergeOverwrite, so callers can override individual fields (e.g. just initialDelaySeconds) without restating the entire probe shape.
  • Add livenessProbe (object, default {}). Same merge semantics.

Defaults are unchanged so existing installs render identically.

Verification

  • helm lint helm/backstage clean
  • helm template ... --set replicas=2 --set livenessProbe.initialDelaySeconds=120 --set livenessProbe.failureThreshold=10 --set readinessProbe.initialDelaySeconds=60 renders the expected Deployment with replicas: 2, the chart's default httpGet probe paths/ports preserved, and the overridden timing fields applied.

Why now

The BWI bundle (giantswarm/bwi bwi-backstage) ships an SQLite-PVC-backed Backstage and reconciles via Flux. Every bundle release reverts hand-patched probe overrides on the live Deployment, and Backstage's plugin-heavy cold start exceeds the default 10s liveness, leaving the new pod in CrashLoopBackOff. With these knobs the bundle can set livenessProbe.initialDelaySeconds: 120, failureThreshold: 10 and readinessProbe.initialDelaySeconds: 60, failureThreshold: 20 once and have it survive reconciliation.

Made with Cursor

The chart hardcoded `replicas: 1` and the liveness/readiness probe
parameters in the Deployment template, with no values knob to override
them. That worked when Backstage installs were small and a 10s
initialDelaySeconds liveness was generous, but plugin-heavy installs
(BWI portal, etc.) take 60-120s to register all plugins on a cold
start and get killed mid-init by the default liveness; operators
working around this had no choice but to hand-patch the live
Deployment after every chart upgrade, which is reverted on the next
HelmRelease reconcile.

Add three new value knobs:

- `replicas` (integer, default 1) -- the same default as before; only
  safe to bump when backing the install with an RWX volume or
  external Postgres database. Documented on the value.
- `readinessProbe` (object, default {}) -- merged over the chart's
  default readiness probe, so callers can override individual fields
  (e.g. just `initialDelaySeconds`) without restating the entire
  probe shape.
- `livenessProbe` (object, default {}) -- same merge semantics for
  the liveness probe.

Defaults are unchanged so existing installs render identically.

Co-authored-by: Cursor <cursoragent@cursor.com>
@teemow
teemow requested a review from a team as a code owner May 9, 2026 08:24

@marians marians left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me

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.

2 participants