← Back to Pull requests

feat(rbac): grant read access to NodeReadinessEvaluations in helper roles #517

Open
unknown opened this pull request with 280 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 27, 2026 03:31 UTC
Author

Description

The NodeReadinessEvaluation CRD ships in the installer since #345, but no shipped role lets a non-admin user read it: config/rbac and the Helm chart only scaffold the admin, editor and viewer helper roles for NodeReadinessRule. Following the maintainer direction on the linked issue, this extends the three existing helper ClusterRoles with read-only NRE rules (get/list/watch plus status get) instead of creating separate NRE identities.

Related Issue

Fixes #515

Type of Change

/kind feature

Testing

  • make test passes (all non-e2e packages, envtest on Kubernetes 1.36.2).

  • helm lint clean; helm unittest --strict: 54/54 pass, including a new rbac_test case asserting all three helper roles grant read-only NRE access and that no helper role gains NRE write verbs.

  • Real authorization run against an envtest API server (Kubernetes 1.36.2, RBAC enforced), with nodereadinessrule-viewer-role bound to a test user:

  • - On main's roles: SubjectAccessReview for get/list/watch on nodereadinessevaluations and get on nodereadinessevaluations/status all return denied, and a real LIST fails with nodereadinessevaluations.readiness.node.x-k8s.io is forbidden, matching the issue's kubectl auth can-i repro.
    - With this change: get, list, watch and status get are allowed; create and delete stay denied.

    (make lint passes on this head: golangci-lint v2.12.1 and the custom kube-api-linter both report 0 issues.)

    Checklist


  • make test passes

  • make lint passes
  • Does this PR introduce a user-facing change?

    ``release-note
    The nodereadinessrule admin, editor and viewer helper ClusterRoles now also grant read-only access to NodeReadinessEvaluation resources (get, list, watch, and status get), in both the kustomize installer and the Helm chart.
    `

    Generative AI Usage Disclosure


  • No AI tools were used

  • AI tools were used (complete below)
  • How they were used:
    AI assistance was used to prepare the code changes, the chart unit test, and the verification runs described in Testing (envtest authorization checks,
    make test, helm unittest`). All verification output above comes from real local runs on this change.

    Diff: 280 lines (+210 / -70) across 3 files Reviewer: ajaysundark Review duration: 6768m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 280 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.337
    Real PR Conversation Timeline
    1 comments
    "Review active on #517"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 22.6% · Safe to merge
    22.6%