← Back to Pull requests

[Helm] Support configurable ServiceMonitor apiVersion for Azure Managed Prometheus #5349

Open
jabbera opened this pull request with 18 lines diff across 4 files
View on GitHub
jabbera jabbera commented on Sep 29, 2026 14:53 UTC
Author

<!-- Thank you for your contribution! -->

<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->

Why are these changes needed?

Azure Managed Prometheus (Azure Monitor managed service for Prometheus) does not use the monitoring.coreos.com/v1 CRDs. It uses azmonitoring.coreos.com/v1 for ServiceMonitor/PodMonitor resources (migration guide). The kuberay-operator chart hardcodes monitoring.coreos.com/v1, so its ServiceMonitor can't be used on AKS with Azure Managed Prometheus.

This PR adds a metrics.serviceMonitor.apiVersion value, defaulting to monitoring.coreos.com/v1, so existing behavior is unchanged. For Azure Managed Prometheus:

metrics:
  serviceMonitor:
    enabled: true
    apiVersion: azmonitoring.coreos.com/v1

Changes:

  • templates/servicemonitor.yaml: the apiVersion is now configurable.

  • values.yaml / README.md: added and documented metrics.serviceMonitor.apiVersion.

  • tests/servicemonitor_test.yaml: added a unit test for the override.
  • Related issue number

    Closes #5348

    Labels

    <!-- Please add the appropriate labels to this PR. -->

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [x] Unit tests
    - [ ] Manual tests
    - [ ] This PR is not tested :(

    helm unittest -f 'tests/*.yaml' helm-chart/kuberay-operator: passed (9 suites, 83 tests).

    Authored by GitHub Copilot, but solves a real issue I have.

    Diff: 18 lines (+17 / -1) across 4 files Reviewer: win5923 Review duration: 6826m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.48) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 18 lines diff across 4 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 1 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.176
    Sensitive Paths sensitive_paths
    0.048
    Real PR Conversation Timeline
    4 items
    win5923 win5923 commented on Sep 30, 2026 03:36 UTC
    Reviewer

    Could you fix the lint error?

    jabbera jabbera commented on Sep 30, 2026 15:53 UTC
    Author

    @win5923 all set!

    win5923 win5923 approved these changes on Sep 30, 2026 16:07 UTC
    Approved Reviewer

    Thanks!

    Reviewers
    Assignees
    jabbera jabbera
    Labels
    risk: low confidence: 89.1% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 48.2% (MEDIUM) · Higher = larger blast radius
    48.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.1% · Lower = rushed or shallow review
    89.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.2% · Safe to merge
    5.2%