Skip to content

[kube-prometheus-stack] Add admission webhook PromQL options#6945

Merged
jkroepke merged 2 commits into
prometheus-community:mainfrom
davidbrusius:add-kps-webhook-promql-options
May 27, 2026
Merged

[kube-prometheus-stack] Add admission webhook PromQL options#6945
jkroepke merged 2 commits into
prometheus-community:mainfrom
davidbrusius:add-kps-webhook-promql-options

Conversation

@davidbrusius
Copy link
Copy Markdown
Contributor

@davidbrusius davidbrusius commented May 27, 2026

What this PR does / why we need it

Adds prometheusOperator.admissionWebhooks.deployment.promqlOptions to kube-prometheus-stack and renders it as the --promql-options argument on the separate prometheus-operator admission webhook deployment.

This lets users enable PromQL parser options for webhook validation of PrometheusRule resources, e.g. extended-range-selectors, matching the admission webhook CLI support added in prometheus-operator v0.91.0.

Example:

prometheusOperator:
  admissionWebhooks:
    deployment:
      enabled: true
      image:
        tag: v0.91.0
      promqlOptions:
        - extended-range-selectors

Which issue this PR fixes

N/A

Special notes for your reviewer

promqlOptions defaults to an empty list. When set, it requires the prometheus-operator/admission-webhook image to be v0.91.0 or newer.

Local validation run:

  • helm dependency build charts/kube-prometheus-stack
  • helm lint charts/kube-prometheus-stack
  • helm unittest --strict --file 'unittests/**/*.yaml' charts/kube-prometheus-stack
  • helm template ... confirmed --promql-options=extended-range-selectors,experimental-functions is rendered

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Signed-off-by: David Brusius <brusiusdavid@gmail.com>
@jkroepke jkroepke enabled auto-merge (squash) May 27, 2026 18:03
@jkroepke
Copy link
Copy Markdown
Member

Thanks

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