← Back to Pull requests

fix: stop dropping ClusterRoles from the metrics server manifest #354

Closed
unknown closed this pull request without merging on Oct 23, 2026 13:17 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 19:52 UTC
Author

sortMetricsResources ordered the metrics server resources by writing each one into a fixed slot per kind, so it kept at most one ClusterRole. KEDA 2.21.0 adds the aggregated keda:edit and keda:view ClusterRoles, and parseManifestsFromFile sent them to the metrics server group like any other ClusterRole. keda:view then took the slot of keda-external-metrics-reader and keda:edit was lost, so a fresh install with the 2.21.0 manifests would leave the HPA controller unable to read external metrics.

  • Sort the metrics server resources with a stable sort, which keeps the existing order without dropping any of them.

  • Install keda:edit and keda:view together with the KEDA operator: they grant access to KEDA's own resources and carry the keda-operator labels.

  • Add unit tests for both, plus one checking that every resource in the embedded manifests lands in exactly one operand group, so a future KEDA manifest update can't silently lose resources again.
  • The current 2.20.2 manifests aren't affected, since they have one resource per slot, but this has to merge before the 2.21.0 manifests land.

    Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)
  • Part of #349

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Bug Fixes
    Controller deployment manifests now include the keda-operator, keda:edit, and keda:view ClusterRole resources in the appropriate manifest.
    * Metrics resources are now processed in a consistent order, with the external metrics controller’s ClusterRoleBinding ordered before other ClusterRoleBindings. Unrecognized resource kinds retain their relative order.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 231 lines (+173 / -58) across 2 files Reviewer: linkvt Review duration: 1045m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 231 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #354"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 37% (MEDIUM) · Higher = larger blast radius
    37%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 14.6% · Safe to merge
    14.6%