Skip to content

Remove OpenShift-specific code once Gateway API is the default #4693

@laurafitzgerald

Description

@laurafitzgerald

Summary

KubeRay's `RayCluster` reconciler contains OpenShift-specific logic to create a `Route` object for dashboard access, since OpenShift historically didn't support Ingress natively. Now that Gateway API support is maturing, this code path should be removed once it's no longer needed for backward compatibility.

What to remove

  • `ray-operator/controllers/ray/utils/openshift.go` — `IsOpenShiftCluster()`, `ShouldUseIngressOnOpenShift()`, and the `openShiftAPIGroups` detection list
  • `ray-operator/controllers/ray/common/openshift.go` — `BuildRouteForHeadService()` and its test file
  • `shouldCreateOpenShiftRoute()` in `raycluster_controller.go` and all related Route reconciliation logic
  • `IsOpenShift` and `UseIngressOnOpenShift` fields from `RayClusterReconcilerOptions`
  • The `isOpenShift` detection call in `main.go`

Pquisites before removing

  • Gateway API support in KubeRay is stable and recommended for production use
  • A reasonable backward compatibility window has passed for OpenShift users still relying on Route creation
  • Any remaining platform-specific behaviour is handled via webhooks, per the controlled network environment proposal

Background

Context was discussed in #4365. The short-term goal of that PR was to clean up the detection logic and isolate all OpenShift-specific code into dedicated files (`utils/openshift.go`, `common/openshift.go`). This issue tracks the eventual full removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions