← Back to Pull requests

[Helm][Feat] Expose enableIngress and ingressOptions in the RayCluster chart #5195

Closed
unknown closed this pull request without merging on Sep 15, 2026 15:04 UTC
View on GitHub
unknown unknown commented on Aug 25, 2026 04:05 UTC
Author

Why are these changes needed?

KubeRay 1.7 added headGroupSpec.ingressOptions to the RayCluster CRD in #4901, which lets users customize the Ingress the operator generates for the head dashboard (host, path, pathType, tls). The ray-cluster Helm chart does not expose it, so Helm users cannot enable or configure the generated Ingress.

This PR exposes those settings in the chart:

head.ingressOptions is passed through to spec.headGroupSpec.ingressOptions with toYaml, so any field the CRD supports now or later works without further chart changes. This matches how head.headService and head.autoscalerOptions are already handled.
head.enableIngress is exposed as well. The operator only builds an Ingress when headGroupSpec.enableIngress is true, and the chart never exposed that flag either, so ingressOptions on its own would have no effect. Both fields are needed for the chart to produce a working Ingress end to end.

Both values are commented out in values.yaml and rendered with {{- with }}, so they are omitted from the RayCluster spec unless the user sets them. The default rendering is byte for byte identical to before this change, and the operator and CRD defaults still apply when the fields are unset.

Example usage:

annotations:
  kubernetes.io/ingress.class: nginx

head:
  enableIngress: true
  ingressOptions:
    host: ray.example.com
    path: /dashboard
    pathType: Exact
    tls:
      - hosts:
          - ray.example.com
        secretName: ray-tls

Related issue number

Closes #5189

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
    - [x] Manual tests

    Helm unit tests added in helm-chart/ray-cluster/tests/raycluster_test.yaml:

    neither field appears in the rendered spec by default
    head.enableIngress: true renders enableIngress: true
    head.enableIngress: false renders nothing, leaving the CRD default in place
    head.ingressOptions with host, path, pathType and tls is passed through unchanged

    helm unittest helm-chart/ray-cluster --file "tests/*/_test.yaml" --strict passes, 108 tests. helm lint passes. make -C helm-chart helm-docs produces no diff, since helm-docs does not document commented out keys.

    Manual test instructions

    Verified end to end on a KinD cluster with the operator installed from this repo (quay.io/kuberay/operator:nightly).

    kind create cluster --name ingress-opts-test
    helm install kuberay-operator ./helm-chart/kuberay-operator --wait
    
    helm template raycluster ./helm-chart/ray-cluster \
      --set annotations."kubernetes\.io/ingress\.class"=nginx \
      --set head.enableIngress=true \
      --set head.ingressOptions.host=ray.example.com \
      --set head.ingressOptions.path=/dashboard \
      --set head.ingressOptions.pathType=Exact \
      --set head.ingressOptions.tls[0].secretName=ray-tls \
      --set head.ingressOptions.tls[0].hosts[0]=ray.example.com | kubectl apply -f -
    
    kubectl get ingress -o yaml
    

    The Ingress created by the operator carries every configured field:

    name: raycluster-kuberay-head-ingress
    ingressClassName: nginx
    tls: [{"hosts":["ray.example.com"],"secretName":"ray-tls"}]
    host: ray.example.com
      path: /dashboard | pathType: Exact | backend: {"name":"raycluster-kuberay-head-svc","port":{"number":8265}}
    

    Additional checks on the same cluster:

    kubectl apply --dry-run=server on the rendered chart is accepted by the API server, confirming the field paths match the CRD schema.
    A deliberately invalid value is rejected by CRD validation rather than silently ignored:
    spec.headGroupSpec.ingressOptions.pathType: Unsupported value: "Bogus": supported values: "Exact", "Prefix", "ImplementationSpecific"

  • A second release installed with default values produces no Ingress at all, so existing users are unaffected.
  • Diff: 529 lines (+396 / -133) across 6 files Reviewer: machichima Review duration: 30899m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.71) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 529 lines diff across 6 files
    0.71
    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%
    56%
    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.375
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #5195"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 71% (HIGH) · Higher = larger blast radius
    71%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 30.7% · Safe to merge
    30.7%