Skip to content

Existing cluster - #1

Open
chjdev wants to merge 2 commits into
mainfrom
existing-cluster
Open

chjdev wants to merge 2 commits into
mainfrom
existing-cluster

Conversation

@chjdev

@chjdev chjdev commented Oct 8, 2026

Copy link
Copy Markdown

Tracking issue

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Stack

If you do use git town to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.

Docs link

chjdev added 2 commits October 8, 2026 09:01
A Ray task can name an existing KubeRay RayCluster in the task config key ray.existing_cluster. The plugin then emits a RayJob with clusterSelector instead of a cluster spec, so the task runs as the job driver on that cluster. KubeRay never deletes a selected cluster; shutdown and TTL stay unset.

The key is read from TaskTemplate.config and from the container config, where the Flyte 2 SDK's config() hook writes it. Selector jobs may carry no custom. The task container's literal env vars are forwarded to the driver through runtime_env.env_vars, since the driver runs on the cluster's head instead of the task pod. The submitter pod uses the task image with KubeRay's default submitter resources. SidecarMode is rejected because KubeRay does not support it for selector jobs.

The mode is off by default (allowExistingCluster): the driver runs with the selected cluster's identity, so operators opt in.

Signed-off-by: Christian <chjdev@users.noreply.github.com>
KubeRay sets JobDeploymentStatus ValidationFailed for a RayJob spec it rejects. GetTaskPhase returned an unknown-status error, so the task was retried as a system error. It now fails with KubeRay's message, and IsTerminal reports the status as terminal.

Signed-off-by: Christian <chjdev@users.noreply.github.com>
@chjdev
chjdev requested review from antholzer and msperk October 8, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant