chart: make replicas, livenessProbe, and readinessProbe configurable#1644
Open
teemow wants to merge 1 commit into
Open
chart: make replicas, livenessProbe, and readinessProbe configurable#1644teemow wants to merge 1 commit into
teemow wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The chart hardcoded
replicas: 1and 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
initialDelaySecondsliveness 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
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.readinessProbe(object, default{}). Merged over the chart's default readiness probe viamergeOverwrite, so callers can override individual fields (e.g. justinitialDelaySeconds) without restating the entire probe shape.livenessProbe(object, default{}). Same merge semantics.Defaults are unchanged so existing installs render identically.
Verification
helm lint helm/backstagecleanhelm template ... --set replicas=2 --set livenessProbe.initialDelaySeconds=120 --set livenessProbe.failureThreshold=10 --set readinessProbe.initialDelaySeconds=60renders the expected Deployment withreplicas: 2, the chart's defaulthttpGetprobe paths/ports preserved, and the overridden timing fields applied.Why now
The BWI bundle (
giantswarm/bwibwi-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 inCrashLoopBackOff. With these knobs the bundle can setlivenessProbe.initialDelaySeconds: 120, failureThreshold: 10andreadinessProbe.initialDelaySeconds: 60, failureThreshold: 20once and have it survive reconciliation.Made with Cursor