← Back to Pull requests

SPLAT-3064: vsphere: add privilege scopes and tighten credential validation #11119

Open
unknown opened this pull request with 391 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 19, 2026 19:51 UTC
Author

Follow-up to #10895, which is now merged.

This adds the vSphere object scope to every privilege in the component-scoped credential matrix, using the OpenShift Container Platform 5.0 vCenter requirements tables (2.6, and 2.8 through 2.12). It also fixes the validation and client-management issues found while reviewing the original change.

Changes

  • Add a Scope (vSphere object) column to each table in docs/user/vsphere/component-privileges.md, splitting rows where privileges belong at different scopes. Record the propagation rules (Table 2.8) and mark the privileges that the 5.0 tables do not cover (for example Host.Inventory.EditCluster, and the Cloud Controller Manager and Problem Detector rows, which have no published 5.0 privilege table).

  • Accept credentialsMode: Manual for vSphere only with component-scoped credentials. Global credentials previously passed validation with Manual but generated neither 99_cloud-creds-secret.yaml nor the component Secrets, leaving the cluster without vCenter credentials.

  • Require component-scoped credentials as well as the feature gate before requiring Host.Inventory.EditCluster for HostGroup failure domains, so existing global-credential install configs keep their previous validation even when the gate is enabled for another feature.

  • Reuse one component vCenter client per (vCenter, component) instead of opening and holding a session per failure domain.

  • Stop falling back to the installer privilege matrix for privilege groups a component does not define.

  • Assert the stable part of the feature-gate error in tests so an openshift/api update that enables the gate in another feature set does not require wording changes.
  • Testing

    go build ./pkg/types/validation/... ./pkg/asset/installconfig/vsphere/...
    go vet ./pkg/types/validation/ ./pkg/asset/installconfig/vsphere/
    go test ./pkg/types/validation/... ./pkg/asset/installconfig/vsphere/...
    

    go test result: 569 passed.

    🤖 Generated with Claude Code

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

    Summary by CodeRabbit

    New Features
    Component-scoped vSphere credentials can include an optional installer account. Installer-provisioned installations require it; user-provisioned installations can fall back to the machine-management account. Installer credentials are not delivered to the cluster.
    Component-scoped credentials support Manual credentials mode; global credentials do not.
    The Machine Config Operator can use its own vCenter account.
    Bug Fixes
    Privilege validation now reflects credential scope and checks HostGroup reconfiguration permissions when required by topology and feature settings.
    Installer operations select the appropriate credentials, including the machine-management fallback for user-provisioned installations.
    Documentation
    * Expanded guidance on component accounts, privilege scopes, conditional operations, and credential setup.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 391 lines (+293 / -98) across 4 files Reviewer: vr4manta Review duration: 21293m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 391 lines diff across 4 files
    0.43
    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%
    46%
    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.357
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #11119"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 43.1% (MEDIUM) · Higher = larger blast radius
    43.1%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 23.0% · Safe to merge
    23.0%