Skip to content

feat(helm): validate architecture.storage values - #6077

Open
ankit373 wants to merge 1 commit into
grafana:mainfrom
ankit373:helm/validate-architecture
Open

ankit373 wants to merge 1 commit into
grafana:mainfrom
ankit373:helm/validate-architecture

Conversation

@ankit373

Copy link
Copy Markdown

fixes #4473

adds a pyroscope.validateArchitecture helper that fails helm template / helm install on bad architecture.storage values:

  • v1 and v2 both off. this check was already in NOTES.txt, i moved it into the helper so all the checks live in one place
  • v1+v2 mode: ingesterWeight and segmentWriterWeight must be numbers in [0, 1], and at least one has to be 1. sendToBoth draws one r in [0, 1) per write and sends to each path whose weight is >= r, so with e.g. 0.5/0.5 about half the writes go nowhere and the client still gets a 200
  • v1+v2 mode: queryBackendFrom must be auto or a format -enable-query-backend-from can parse, otherwise query-frontend crashes on startup

the migration values are only checked in v1+v2 mode, since that's the only mode where the chart uses them.

numbers set with --set (like 0.1) come through as strings, so the helper checks the text form instead of the type.

rendered outputs don't change. added unit/architecture_test.go with valid and invalid cases, run by make helm/check.

the queryBackendFrom check is a bit beyond what the issue lists, happy to drop it if you'd rather keep this smaller.

Fail early on settings that would break or silently lose data:

- v1 and v2 storage both disabled (moved from NOTES.txt so it lives
  with the other checks)
- in v1+v2 mode, ingesterWeight and segmentWriterWeight must be
  numbers in [0, 1], and at least one must be 1. The write path
  router sends a request to a path when rand[0,1) <= its weight, so
  if both are below 1 a share of writes goes nowhere.
- in v1+v2 mode, queryBackendFrom must be "auto" or a time format
  accepted by -enable-query-backend-from.

Fixes grafana#4473

Signed-off-by: Ankit Jha <jhaankit373@gmail.com>
@ankit373
ankit373 requested a review from a team as a code owner November 10, 2026 13:06
@cla-assistant

cla-assistant Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Nov 10, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Nov 10, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Ensure helm chart validates provided values

1 participant