Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: support VictoriaMetrics MetricsQL#8469

Open
robbat2 wants to merge 3 commits intoprometheus-operator:mainprometheus-operator/prometheus-operator:mainfrom
robbat2:rjohnson/MetricsQLrobbat2/prometheus-operator:rjohnson/MetricsQLCopy head branch name to clipboard
Open

feat: support VictoriaMetrics MetricsQL#8469
robbat2 wants to merge 3 commits intoprometheus-operator:mainprometheus-operator/prometheus-operator:mainfrom
robbat2:rjohnson/MetricsQLrobbat2/prometheus-operator:rjohnson/MetricsQLCopy head branch name to clipboard

Conversation

@robbat2
Copy link
Copy Markdown

@robbat2 robbat2 commented Mar 27, 2026

The admission webhook presently rejects VictoriaMetric's dialect of PromQL:
MetricsQL. Make it a configurable option to accept in the cluster, where
PrometheusRule is being used and converted into VictoriaMetrics resources.

Without this patch, you cannot use PrometheusRule resources that contain
MetricsQL expressions unless the admission webhook is disabled, which is not
desirable.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Signed-off-by: Robin H. Johnson rjohnson@coreweave.com

@robbat2 robbat2 requested a review from a team as a code owner March 27, 2026 20:49
robbat2 and others added 2 commits March 27, 2026 16:34
The admissiion webhook presently rejects VictoriaMetric's dialect of PromQL:
MetricsQL. Make it a configurable option to accept in the cluster, where
PrometheusRule is being used and converted into VictoriaMetrics resources.

Without this patch, you cannot use PrometheusRule resources that contain
MetricsQL expressions unless the admission webhook is disabled, which is not
desirable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
@robbat2 robbat2 force-pushed the rjohnson/MetricsQL branch from f4a3cf0 to e10aa2a Compare March 27, 2026 23:35
@simonpasquier
Copy link
Copy Markdown
Contributor

While the change is minimal, I'm reluctant incurring support cose for something that's not core to the project.

I would have assumed that you'd use VM operator's CRDs (https://docs.victoriametrics.com/operator/api/#vmrule). What's the scenario where you prefer using Prometheus operator CRDs?

@robbat2
Copy link
Copy Markdown
Author

robbat2 commented Apr 1, 2026

@simonpasquier - many existing Helm Charts ship with out of the box PrometheusRules, and may bundle prometheus-operator as well; this enables the smallest lift for those environments that happen to have VictoriaMetrics behind them.

The VM Operator validating webhook also doesn't validate PrometheusRule today [it does validate VMRule] - I have a draft change to implement that where it would be more appropriate as well; but want to be able to catch this quicker

Comment thread cmd/admission-webhook/main.go Outdated
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Reference: prometheus-operator#8469 (comment)
@simonpasquier
Copy link
Copy Markdown
Contributor

Sorry, I still don't understand the use case: if you use the MetricsQL variant for rules then it falls under the responsibility of the VM operator from my perspective.
The configuration of validating webhooks allows to filter PrometheusRule resources by label(s) so one can put a label to identify PrometheusRule which should/shouldn't go through the Prometheus-operator's validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.