Skip to content

fix: patch Grafana telemetry CRD validation - #94

Closed
amwarrier wants to merge 1 commit into
mainfrom
agent/fix-grafana-crd-validation
Closed

fix: patch Grafana telemetry CRD validation#94
amwarrier wants to merge 1 commit into
mainfrom
agent/fix-grafana-crd-validation

Conversation

@amwarrier

Copy link
Copy Markdown
Contributor

What changed

  • Patch the bundled GrafanaNotificationPolicy CRD before Helm install or upgrade when full telemetry is enabled.
  • Rewrite the invalid CEL field access from self.continue to Kubernetes' reserved-keyword form, self.__continue__.
  • Traverse nested Helm dependencies so both the mutable and immutable CRD copies are covered.
  • Add regression tests for both copies, already-fixed charts, unrelated files, and preservation of the remaining validation rules.

Root cause

Operator chart 2.0.0-beta.1 bundles Grafana Operator chart 5.21.4. Its GrafanaNotificationPolicy CRD uses continue, a CEL reserved keyword, without Kubernetes' required escaping. Kubernetes versions before 1.32 reject the CRD while compiling the validation rule, causing full-telemetry deployment to fail before the W&B operator is installed.

This applies the same expression change as the upstream Grafana Operator fix. The workaround is narrowly scoped to the exact CRD filename and expression, so a future operator chart containing the upstream fix is left unchanged.

Impact

Full telemetry installations from Watchtower/WSM can deploy to Kubernetes 1.30. Telemetry off and forward are unchanged.

Validation

  • go test ./...
  • golangci-lint run --timeout=5m --concurrency=4 --max-same-issues=20
  • Verified the patch against both affected CRD copies in the exact operator-2.0.0-beta.1 archive downloaded by Watchtower.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00261ce3-bbe9-4b53-a004-5df0b217b9ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-grafana-crd-validation

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.

@amwarrier

Copy link
Copy Markdown
Contributor Author

Closing in favor of the fix at the dependency owner: wandb/operator#274 upgrades Grafana Operator to 5.22.2, which contains the upstream Kubernetes CEL compatibility fix. The WSM-side chart mutation is no longer the intended solution.

@amwarrier amwarrier closed this Jul 20, 2026
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.

1 participant