← Back to Pull requests

RHOAIENG-61067: integrate with cluster TLS security profile #214

Closed
unknown closed this pull request without merging on Jul 22, 2026 10:03 UTC
View on GitHub
unknown unknown commented on Jul 07, 2026 09:59 UTC
Author

Why are these changes needed?

OCP 5.0 (GA October 2026) requires all components to honor the centralized TLS
profile (OCPSTRAT-2611).
This adds TLS profile integration to kuberay-operator so the metrics server
respects the cluster-wide MinVersion, CipherSuites, and ALPN settings.

On non-OpenShift clusters or when the API is temporarily unavailable (transient
errors: ServiceUnavailable, Timeout, TooManyRequests), the operator falls back
to hardened Intermediate defaults (TLS 1.2, modern cipher suite, h2/http1.1 ALPN).

Replaces #200 (closed due to broken branch ancestry from shallow clone).

Changes

  • ray-operator/pkg/tls/tls.go: reusable TLS profile resolution from the

  • apiservers.config.openshift.io/cluster CR
  • ray-operator/pkg/tls/tls_test.go: table-driven tests for all profile types

  • (nil, Intermediate, Modern, Old, Custom with valid/invalid ciphers)
  • ray-operator/main.go: 10-second bootstrap context, fetch TLS profile before

  • manager creation, apply TLSOpts to metrics server
  • ray-operator/controllers/ray/authentication_controller.go: kubebuilder RBAC

  • marker for apiservers
  • ray-operator/config/rbac/role.yaml: apiservers permission added

  • ray-operator/Dockerfile: COPY pkg/tls

  • helm-chart/kuberay-operator/templates/_helpers.tpl: helm RBAC alignment
  • Reference: openshift/cluster-machine-approver #286

    Related issue number

    RHOAIENG-61067

    Checks

  • I've made sure the tests are passing.

  • Testing Strategy

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

    [OCPSTRAT-2611]: https://redhat.atlassian.net/browse/OCPSTRAT-2611?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    [RHOAIENG-61067]: https://redhat.atlassian.net/browse/RHOAIENG-61067?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

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

    Summary by CodeRabbit

    New Features
    Apply the cluster’s OpenShift TLS security profile to the operator’s metrics server when available.
    Added OpenShift-specific permissions to read API server TLS profile information.
    Bug Fixes
    Improved TLS configuration resilience with hardened defaults when TLS profile resolution fails or is unavailable.
    Tests
    * Added unit tests for TLS security profile parsing, including custom cipher mapping and unsupported-cipher behavior.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 336 lines (+252 / -84) across 4 files Reviewer: kryanbeane Review duration: 21604m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 336 lines diff across 4 files
    0.65
    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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #214"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 65.4% (HIGH) · Higher = larger blast radius
    65.4%
    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: 25.8% · Safe to merge
    25.8%