Skip to content

[docs] vendor the KubeRay CRD API reference into the Ray docs - #65428

Merged
dstrodtman merged 5 commits into
masterfrom
doc-1437-kuberay-api-reference
Aug 14, 2026
Merged

dstrodtman merged 5 commits into
masterfrom
doc-1437-kuberay-api-reference

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

The KubeRay CRD API reference — the field-level reference for RayCluster, RayJob, RayService, and RayCronJob — is published only on the MkDocs site at ray-project.github.io/kuberay. That site has two problems that compound each other:

  • Its mkdocs.yml nav: block contains only index.md. The API reference builds and serves but appears nowhere in site navigation, so it's reachable only by direct URL, site search, or a search engine.
  • Its landing page states that documentation has moved to ray-project/ray.

Meanwhile doc/source/cluster/kubernetes/references.md here is a ~14-line stub whose entire substance is an outbound link to that page. So Ray's documented answer for "what fields does a RayCluster support?" is a link off-site to a nav-hidden page on a site that says it holds no documentation. It's also the most actively updated file in the KubeRay docs/ tree — recent CRD features (AuthOptions, GcsEmbeddedStorage, NetworkPolicyRules, IngressOptions, HistoryServerOptions, RayCronJob) all extend it.

This vendors the generated reference into the Ray docs and repoints the inbound links at it.

What changed

File Change
doc/source/cluster/kubernetes/references/api.md New. Vendored generated reference, ray.io/v1 only, from the v1.6.2 release tag.
doc/source/cluster/kubernetes/references.md Toctree entry; the outbound link becomes a {ref}; added a note that v1alpha1 is deprecated.
doc/source/cluster/kubernetes/getting-started/rayjob-quick-start.md Outbound link → {ref}.
doc/source/cluster/kubernetes/user-guides/gcp-gke-tpu-cluster.md Outbound link → the operator installation page (see below).

Content-only: every changed file is under doc/, so the docs-go label's scope guard (ci/lint/validate_docs_go_scope.sh) passes. An earlier revision of this PR also added a .github/CODEOWNERS entry for the generated file; it's dropped, both because it would have failed that guard and because the existing /doc/source/cluster/kubernetes/ rule already assigns @andrewsykim @ray-project/ray-core @ray-project/ray-docs — a more specific rule would have narrowed ownership by dropping ray-core. The generated-file header is what deters hand-edits.

How the source artifact is produced

docs/reference/api.md in ray-project/kuberay is a committed build artifact, not a hand-written page. make api-docs runs elastic/crd-ref-docs (pinned v0.2.0) over the Go CRD types in ray-operator/apis/ray/. The ray-operator-verify-api-docs job in .github/workflows/consistency-check.yaml regenerates and diffs it on every push and PR to master and release-*, failing on drift.

That CI job is what makes a vendored copy viable: freshness is already enforced upstream, so the copy has a single well-defined source of truth. Because the job covers release-* too, a release tag's api.md is equally guaranteed consistent with that branch's CRD types.

Why the v1.6.2 release tag, not master

Per @andrewsykim's review, this now vendors from the latest KubeRay release rather than from master. master carries CRD surface that no release ships — diffing docs/reference/api.md at v1.6.2 against master is +247 lines, adding twelve types that exist in no release:

CollectorOptions, GcsEmbeddedStorage, GCSStorageDeletionPolicy, GcsFaultToleranceBackend, HistoryServerOptions, IngressOptions, IngressPathType, NetworkPolicyConfig, NetworkPolicyMode, NetworkPolicyRules, TLSOptions, WorkerGroupNetworkPolicyRules

plus field-level additions such as priority, suspend, timeZone, and command/args.

The source ref is the tag, not the release branch head: release-1.6 is currently one commit ahead of v1.6.2. The page body now states the KubeRay version, so the fields a reader sees are attributable to a version they can install; the generated-file comment records the tag and its commit SHA.

Why ray.io/v1 only

The upstream artifact documents both ray.io/v1 and ray.io/v1alpha1. This copy carries only v1, for two reasons.

v1alpha1 is deprecated and on a removal runway. It hasn't been the storage version since v1.0 (October 2023), receives no new fields, and kuberay-project/kuberay#5124 tracks its removal. Every CRD feature added since December 2023 is v1-only.

Carrying it would import a silent correctness bug. crd-ref-docs derives anchors from the type name alone, and eleven type names are defined in both API versions (RayClusterSpec, WorkerGroupSpec, RayJob, RayService, AutoscalerOptions, ...). Only the v1 heading owns the slug, so every v1alpha1 cross-link resolves to the v1 definition — with no warning at generation time. The definitions differ substantially (RayClusterSpec has 14 fields in v1, 7 in v1alpha1), so a reader following a v1alpha1 link lands on a table advertising fields that don't exist in that version. Filed upstream as kuberay-project/kuberay#5091.

Dropping the section resolves the collision rather than papering over it. The stripping step is written to become a silent no-op once upstream drops v1alpha1 from generation.

The gcp-gke-tpu-cluster.md link

This one pointed at the MkDocs /deploy/helm/ page, not the API reference. That page documents Helm chart values, while the sentence introducing it is about installing KubeRay. It's repointed at kuberay-operator-installation.md, which is the maintained page for what the sentence actually promises. The helm repo add kuberay https://ray-project.github.io/kuberay-helm/ commands elsewhere in the docs are untouched — that's the Helm chart repository, a different host from the docs site.

Checks

Anchor resolution. The vendored page has 34 h1–h4 headings producing 34 distinct slugs (zero collisions, confirming the v1-only decision eliminates that class) and 67 in-page anchor links across 31 distinct targets, all resolving.

Build. Built the page in a minimal Sphinx project against the pinned docs versions — sphinx 8.2.3, myst-parser 5.1.0 — with myst_heading_anchors = 4, nitpicky = True, and -W --keep-going:

build succeeded.
exit 0

Zero warnings. Inspected the rendered HTML: all 134 internal hrefs have a matching id, and none resolves to a docutils fallback idN.

This page depends on #65240 (h4 heading anchors), which has merged. crd-ref-docs renders every CRD type as an h4 and cross-links types by anchor, so the page could not build under the previous myst_heading_anchors = 3.

A full make rtd build was not run locally; the docs CI build on this PR is the check for that.

Follow-ups (not in this PR)

The sync job. It diffs the processed upstream output against the copy committed here — not against the previous upstream version — so it's idempotent and self-healing: an unmerged sync PR gets updated rather than duplicated, and a hand-edit here gets corrected on the next run. Two open design points, discussed in the review thread:

  • What triggers it. The semantically correct signal is the KubeRay release event with types: [released], which fires only for non-prerelease publishes (every -rc.N tag is flagged prerelease: true). A push: tags trigger would fire at Step 3 of the release process, before images, charts, and validation. Until the workflow can live in a repo that receives KubeRay events, the equivalent is a scheduled poll of GET /repos/ray-project/kuberay/releases/latest, which returns the maintainer-designated latest stable and so isn't fooled by interleaved release lines (v1.5.2 and v1.6.1 published 22 seconds apart).
  • Whether Ray master should also carry a dev reference built from KubeRay master, alongside the stable one. Open question for the maintainers.

Remaining MkDocs-only content. Several other pages on the MkDocs site have no equivalent in the Ray docs — the Helm chart values tables, additional rayStartParams coverage (--no-monitor and the autoscaler READONLY rationale, --block, --address FQDN construction), and the image tagging and registry scheme. Being handled separately.

Related issue number

Depends on #65240 (merged). Related upstream: kuberay-project/kuberay#5091, kuberay-project/kuberay#5124.

AI assistance

AI assistance (Claude Code) was used for the anchor-collision analysis, the release-mechanics analysis, the build verification, the post-processing script, and drafting this description. I reviewed the vendored content and the link changes and can defend both.

@dstrodtman
dstrodtman requested review from a team and andrewsykim as code owners August 12, 2026 14:54
@dstrodtman dstrodtman added docs An issue or change related to documentation docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. labels Aug 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates a generated KubeRay CRD API reference document directly into the documentation, updating various guides to link to this new local reference instead of external URLs. It also updates the CODEOWNERS file to track this new document. The review feedback highlights minor grammatical improvements in the references documentation to enhance readability and flow.

To learn about RayCluster configuration, we recommend taking a look at the {ref}`configuration guide <kuberay-config>`.

For comprehensive coverage of all supported RayCluster fields, refer to the [API reference][APIReference].
For comprehensive coverage of all supported RayCluster fields, refer to the {ref}`KubeRay CRD API reference <kuberay-crd-api-reference>`. It documents every field of the `ray.io/v1` custom resources, and is generated from the KubeRay CRD definitions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comma before 'and is generated' is unnecessary because it connects two parts of a compound predicate sharing the same subject ('It'). Removing it improves grammatical correctness and flow.

Suggested change
For comprehensive coverage of all supported RayCluster fields, refer to the {ref}`KubeRay CRD API reference <kuberay-crd-api-reference>`. It documents every field of the `ray.io/v1` custom resources, and is generated from the KubeRay CRD definitions.
For comprehensive coverage of all supported RayCluster fields, refer to the {ref}`KubeRay CRD API reference <kuberay-crd-api-reference>`. It documents every field of the `ray.io/v1` custom resources and is generated from the KubeRay CRD definitions.

However, KubeRay maintainers preserve the right to mark fields as deprecated and remove functionality associated with deprecated fields after a minimum of two minor releases. In addition, some definitions of the API may see small changes in behavior. For example, the definition of a "ready" or "unhealthy" RayCluster could change to better handle new failure scenarios.

[APIReference]: https://ray-project.github.io/kuberay/reference/api/
The `ray.io/v1alpha1` API version is deprecated. It has not been the storage version since KubeRay v1.0, it receives no new fields, and it is slated for removal. Use `ray.io/v1` instead. The API reference covers `ray.io/v1` only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This sentence contains a comma splice and redundant pronouns ('It has not been..., it receives...'). We can simplify it to improve readability and grammatical correctness.

Suggested change
The `ray.io/v1alpha1` API version is deprecated. It has not been the storage version since KubeRay v1.0, it receives no new fields, and it is slated for removal. Use `ray.io/v1` instead. The API reference covers `ray.io/v1` only.
The `ray.io/v1alpha1` API version is deprecated. It has not been the storage version since KubeRay v1.0, receives no new fields, and is slated for removal. Use `ray.io/v1` instead. The API reference covers `ray.io/v1` only.

@dstrodtman
dstrodtman force-pushed the doc-1437-kuberay-api-reference branch from 3df0465 to 4f5289b Compare August 12, 2026 15:08
The KubeRay CRD API reference lives on the MkDocs site at
ray-project.github.io/kuberay, which has no nav entry for it and a landing
page stating that documentation has moved to ray-project/ray. Ray's
cluster/kubernetes/references.md is a stub that defers to that page, so the
authoritative field-level reference for RayCluster, RayJob, RayService, and
RayCronJob is only reachable by direct URL or search.

This vendors the generated reference into the Ray docs as
doc/source/cluster/kubernetes/references/api.md and repoints the inbound
links at it.

The vendored file carries only the ray.io/v1 section. v1alpha1 is deprecated,
receives no new fields, and is on a removal runway. Dropping it also removes
an anchor-collision class: eleven type names are defined in both API versions
and crd-ref-docs derives anchors from the type name alone, so every
v1alpha1 cross-link silently resolved to the v1 definition.

Also repoints the gcp-gke-tpu-cluster.md link at Ray's own operator
installation page. It pointed at the MkDocs Helm page, which documents chart
values rather than installation, and would break when that site is retired.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1437-kuberay-api-reference branch from 4f5289b to 7591561 Compare August 12, 2026 15:11
@andrewsykim

Copy link
Copy Markdown
Member

In general I think it would be awesome to have KubeRay CRD reference directly in the Ray documentation, but how do we ensure the versions is kept up to date? Should we only update the reference after a KubeRay release?

@andrewsykim

Copy link
Copy Markdown
Member

just saw kuberay-project/kuberay#5092 (comment) :)

@dstrodtman

Copy link
Copy Markdown
Contributor Author

@andrewsykim I'm setting up a GH Actions workflow (currently running in Anyscale docs repo, where I'm an admin). I'm already using this pattern for a number of other x-repo workflows and have alerting configured.

Once I've confirmed this is working, I'll open a PR to port it to KubeRay or Ray repo (I don't have any admin there, so will need to identify who can actually get this live and maintain it over time).

@andrewsykim

Copy link
Copy Markdown
Member

To be clear, I'm not sure we should continously sync CRDs in KubeRay master into Ray docs, cause often it will contain CRD changes that are not released yet

…e tag

The first revision vendored from KubeRay master, which carries CRD surface
that no release ships. Diffing docs/reference/api.md at v1.6.2 against master
shows +247 lines and twelve types that exist in no release: CollectorOptions,
GcsEmbeddedStorage, GCSStorageDeletionPolicy, GcsFaultToleranceBackend,
HistoryServerOptions, IngressOptions, IngressPathType, NetworkPolicyConfig,
NetworkPolicyMode, NetworkPolicyRules, TLSOptions, and
WorkerGroupNetworkPolicyRules.

Vendor from the v1.6.2 release tag instead. Release tags are cut on the
release-X.Y branch, and the ray-operator-verify-api-docs job in
consistency-check.yaml runs on release-* as well as master, so a tag's
api.md is CI-guaranteed consistent with that branch's CRD Go types.

Also state the KubeRay version in the page body rather than only in the
generated-file comment, so readers can tell which release the fields
correspond to.

Verified: 34 h1-h4 headings producing 34 distinct slugs (zero collisions),
67 in-page anchor links across 31 targets, all resolving. Built under
sphinx 8.2.3 and myst-parser 5.1.0 with myst_heading_anchors = 4,
nitpicky = True, and -W --keep-going: zero warnings, exit 0. In the
rendered HTML all 134 internal hrefs have a matching id, with no docutils
fallback ids.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman

Copy link
Copy Markdown
Contributor Author

@andrewsykim agreed, and you're right that it already bit this PR — the first revision vendored from master. I've pushed a re-vendor from the v1.6.2 release tag.

Concretely, docs/reference/api.md at v1.6.2 vs master is +247 lines, adding twelve types that exist in no release:

CollectorOptions, GcsEmbeddedStorage, GCSStorageDeletionPolicy, GcsFaultToleranceBackend, HistoryServerOptions, IngressOptions, IngressPathType, NetworkPolicyConfig, NetworkPolicyMode, NetworkPolicyRules, TLSOptions, WorkerGroupNetworkPolicyRules

plus field-level additions like priority, suspend, timeZone, command/args. The page now also states the KubeRay version in the body, not just in the generated-file comment.

What I found reading the release process

Some of this constrains the sync design, so writing it down:

  • Tags live on the release branch, not master. v1.6.2, v1.6.1, v1.6.0 are reachable only from release-1.6; v1.5.2 only from release-1.5. So the sync sources from the tag.
  • Branch heads drift past their tag. release-1.6 is currently 1 commit ahead of v1.6.2 (chart README bumps). So the tag, not release-X.Y head.
  • ray-operator-verify-api-docs runs on release-* as well as master, which is what makes this safe — any release tag's api.md is CI-guaranteed consistent with that branch's CRD Go types. No regeneration needed on the Ray side.
  • Release lines interleave. v1.5.2 and v1.6.1 were published 22 seconds apart on 2026-04-23. "Most recently published release" is not the highest version, so the sync resolves latest explicitly rather than sorting by date.
  • There are two tags per release — v1.6.2 and ray-operator/v1.6.2 (the Go submodule tag). A tags: ['**'] filter double-fires; v* doesn't, since * won't cross /.

Trigger

docs/development/release.md pushes the tag at Step 3 and publishes the GitHub Release at Step 9, with image builds, Helm chart publishing, and validation in between. So a push: tags trigger fires well before the release is real, and fires on RCs.

The right signal is the release event with types: [released] — it fires only when a non-prerelease is published, and every -rc.N tag is correctly flagged prerelease: true, so RCs are excluded for free.

Since neither release nor push events cross repos and I'm running this from a repo where I have admin, the near-term equivalent is a scheduled poll of GET /repos/ray-project/kuberay/releases/latest. That endpoint returns the maintainer-designated latest stable (v1.6.2 today), which sidesteps the interleaved-release-line problem. The job is a no-op on any poll where the resolved tag hasn't moved. If it later lands in ray-project/kuberay, it becomes the release: released trigger with github.event.release.tag_name as the source ref.

One thing worth deciding: should Ray master carry a dev reference too?

"Latest stable" isn't obviously the only right target, because the Ray docs already document unreleased KubeRay. There are three prose references to v1.7.0 on Ray master right now — a version with no tag and no release-1.7 branch:

  • user-guides/rayjob-sidecar-submitter-restart.md — "KubeRay v1.7.0 or higher"
  • user-guides/rayservice-incremental-upgrade.md — rollback requires v1.7.0+
  • user-guides/configuring-autoscaling.md — command and args (KubeRay >= v1.7.0)

That last one documents fields that only exist in the master api.md, so with this PR as it stands, that guide points at a reference that doesn't contain the fields it describes.

So one option is: on the Ray master branch only, publish a second reference built from KubeRay master, alongside the stable one — an always-available dev view, with the stable page remaining the canonical {ref} target on every branch. Ray release branches would then carry only the stable page.

Two implications if we go that way:

  1. The two pages have to differ additively. Anything cross-linking the reference must target the stable page's ref, which exists on every Ray branch; the dev page is additive on master only. Otherwise a {ref} that resolves on master breaks on the release branch.
  2. It needs a second sync direction. Ray release branches are cut from master, so a Ray release branch would freeze whatever KubeRay reference was current at cut time. When KubeRay ships a release afterward, we'd want to bring the updated stable reference back onto the already-cut Ray release branches — a cherry-pick workflow, not just the forward sync.

Both are tractable, but it's meaningfully more machinery than a single stable page, and it's your call whether the dev view is worth it. My default if you'd rather keep it simple: single stable page, and prose that documents newer behavior keeps its explicit "KubeRay >= v1.7.0" callout to carry the gap, exactly as those three guides already do.

Regenerates the file with the sync job's processor rather than by hand, so the
committed copy and the job's output can't drift. Left to differ, the job's
first run would open a pull request whose only change was the header.

The body is unchanged and byte-identical to the hand-vendored version. Only
the provenance header differs: it now states the release tag in prose, pins
the permalink to the commit that last modified the upstream artifact at that
tag rather than to the tag's own commit, and notes that KubeRay's
consistency-check job covers release-* branches as well as master.

Re-verified after regeneration: build succeeded under sphinx 8.2.3 and
myst-parser 5.1.0 with myst_heading_anchors = 4, nitpicky = True, and
-W --keep-going, with zero warnings; all 134 internal hrefs in the rendered
HTML resolve, with no docutils fallback ids.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Aug 12, 2026
@dstrodtman

Copy link
Copy Markdown
Contributor Author

@andrewsykim Preview seems to render fine here: https://anyscale-ray--65428.com.readthedocs.build/en/65428/cluster/kubernetes/references/api.html#kuberay-crd-api-reference

My main feedback here would be:

  • Because this export chooses to drop the v1alpha1 package, the ref is all for ray.io/v1. Can we collapse/remove the Packages and ray.io/v1 sections without breaking anything (These are currently the only H2s)
  • The "Resource Types" section is just a quick link to the 4 entries that are resource types. Current formatting places this as an H3 and everything else nested underneath at H4. I'd suggest making this an H2.
  • All the API entries should also go up to H2, which will make them always visible on the sidebar.

Note that we should be able to safely apply these changes in post-processing, so you don't need to change anything on KubeRay side.

@ronny-anyscale Would appreciate your eye on this as well.

Regenerated from the sync script, which now drops the package scaffolding,
raises the remaining headings, and writes a real page opening.

The page carried the heading levels crd-ref-docs emits: a `## Packages`
index, a `## ray.io/v1` package heading, `### Resource Types`, and one h4
per CRD type. Those are the right levels for the upstream artifact, which
documents several packages. This page documents one, so the two h2s were
the only h2s on it, and Sphinx's right-hand page nav listed "Packages" and
"ray.io/v1" and nothing else. A 30-entry API reference with an empty page
nav.

The Packages index was also a single bullet linking to the section directly
below it. Dropping both and raising the rest to h2 puts every CRD type in
the page nav.

The `ray.io/v1` heading carried a blurb generated from the Go package
comment, "Package v1 contains API Schema definitions for the ray v1 API
group", which describes a Go package to a reader who came for a field
reference. In its place the page now opens by saying what the reference
covers, with the KubeRay version as a second paragraph rather than the bare
line it was before.

Heading text is untouched, so no anchor moves: 32 headings, 32 distinct
slugs, zero collisions, and all 66 in-page links resolve. The one link
removed is the Packages bullet pointing at the heading this drops.

Content-only, under doc/, single file.

Signed-off-by: Douglas Strodtman <[email protected]>
The Go doc comment these two lines come from marks them with a leading tab,
which is godoc's code-block convention, so crd-ref-docs carries the indentation
through and the renderer turns two full sentences into a preformatted block that
overflows horizontally instead of wrapping. They're the two items of the
enumeration the line above introduces, so a list is what they already are, and
it matches the Semantics list a few lines down.

Also replaces the non-breaking hyphen in "per-rule" with an ASCII one. It looks
identical on screen but doesn't match a reader searching the page for the
hyphenated term.

Both belong upstream in the CRD Go types and are filed as
kuberay-project/kuberay#5146. Until that lands, the job that vendors this file
applies the same two normalizations, so this keeps the committed page and the
generator in agreement.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman

Copy link
Copy Markdown
Contributor Author

Pushed one more commit, 82588d5, so this page matches what the sync job now generates.

crd-ref-docs passes the DeletionStrategy Go doc comment through verbatim, and that comment marks its two mutually exclusive configuration styles with a leading tab. Tab indentation is godoc's code-block convention, so the renderer turned two full sentences into a preformatted block that overflowed horizontally instead of wrapping. They're the two items of the enumeration the line above introduces, so the commit makes them a list, matching the Semantics list a few lines down. It also swaps the non-breaking hyphen in "per-rule" for an ASCII one, which looks identical but doesn't match a reader searching the page.

Both belong upstream in the CRD Go types rather than here, and I've filed them as kuberay-project/kuberay#5146 along with a stale "removal planned for 1.6.0" note in the same comment. Until that lands, the sync job applies these two normalizations on the way in, so the committed page and the generator agree and the next poll after this merges is a no-op.

@dstrodtman
dstrodtman merged commit 83a8eb5 into master Aug 14, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the doc-1437-kuberay-api-reference branch August 14, 2026 16:24
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…oject#65428)

## Why are these changes needed?

The KubeRay CRD API reference — the field-level reference for
`RayCluster`, `RayJob`, `RayService`, and `RayCronJob` — is published
only on the MkDocs site at `ray-project.github.io/kuberay`. That site
has two problems that compound each other:

- Its `mkdocs.yml` `nav:` block contains only `index.md`. The API
reference builds and serves but appears nowhere in site navigation, so
it's reachable only by direct URL, site search, or a search engine.
- Its landing page states that documentation has moved to
`ray-project/ray`.

Meanwhile `doc/source/cluster/kubernetes/references.md` here is a
~14-line stub whose entire substance is an outbound link to that page.
So Ray's documented answer for "what fields does a RayCluster support?"
is a link off-site to a nav-hidden page on a site that says it holds no
documentation. It's also the most actively updated file in the KubeRay
`docs/` tree — recent CRD features (`AuthOptions`, `GcsEmbeddedStorage`,
`NetworkPolicyRules`, `IngressOptions`, `HistoryServerOptions`,
`RayCronJob`) all extend it.

This vendors the generated reference into the Ray docs and repoints the
inbound links at it.

## What changed

| File | Change |
| --- | --- |
| `doc/source/cluster/kubernetes/references/api.md` | **New.** Vendored
generated reference, `ray.io/v1` only, from the `v1.6.2` release tag. |
| `doc/source/cluster/kubernetes/references.md` | Toctree entry; the
outbound link becomes a `{ref}`; added a note that v1alpha1 is
deprecated. |
| `doc/source/cluster/kubernetes/getting-started/rayjob-quick-start.md`
| Outbound link → `{ref}`. |
| `doc/source/cluster/kubernetes/user-guides/gcp-gke-tpu-cluster.md` |
Outbound link → the operator installation page (see below). |

Content-only: every changed file is under `doc/`, so the `docs-go`
label's scope guard (`ci/lint/validate_docs_go_scope.sh`) passes. An
earlier revision of this PR also added a `.github/CODEOWNERS` entry for
the generated file; it's dropped, both because it would have failed that
guard and because the existing `/doc/source/cluster/kubernetes/` rule
already assigns `@andrewsykim @ray-project/ray-core
@ray-project/ray-docs` — a more specific rule would have *narrowed*
ownership by dropping ray-core. The generated-file header is what deters
hand-edits.

### How the source artifact is produced

`docs/reference/api.md` in `ray-project/kuberay` is a committed build
artifact, not a hand-written page. `make api-docs` runs
`elastic/crd-ref-docs` (pinned v0.2.0) over the Go CRD types in
`ray-operator/apis/ray/`. The `ray-operator-verify-api-docs` job in
`.github/workflows/consistency-check.yaml` regenerates and diffs it on
every push and PR to `master` **and `release-*`**, failing on drift.

That CI job is what makes a vendored copy viable: freshness is already
enforced upstream, so the copy has a single well-defined source of
truth. Because the job covers `release-*` too, a release tag's `api.md`
is equally guaranteed consistent with that branch's CRD types.

### Why the `v1.6.2` release tag, not `master`

Per @andrewsykim's review, this now vendors from the latest KubeRay
release rather than from `master`. `master` carries CRD surface that no
release ships — diffing `docs/reference/api.md` at `v1.6.2` against
`master` is **+247 lines**, adding twelve types that exist in no
release:

`CollectorOptions`, `GcsEmbeddedStorage`, `GCSStorageDeletionPolicy`,
`GcsFaultToleranceBackend`, `HistoryServerOptions`, `IngressOptions`,
`IngressPathType`, `NetworkPolicyConfig`, `NetworkPolicyMode`,
`NetworkPolicyRules`, `TLSOptions`, `WorkerGroupNetworkPolicyRules`

plus field-level additions such as `priority`, `suspend`, `timeZone`,
and `command`/`args`.

The source ref is the **tag**, not the release branch head:
`release-1.6` is currently one commit ahead of `v1.6.2`. The page body
now states the KubeRay version, so the fields a reader sees are
attributable to a version they can install; the generated-file comment
records the tag and its commit SHA.

### Why `ray.io/v1` only

The upstream artifact documents both `ray.io/v1` and `ray.io/v1alpha1`.
This copy carries only v1, for two reasons.

**v1alpha1 is deprecated and on a removal runway.** It hasn't been the
storage version since v1.0 (October 2023), receives no new fields, and
kuberay-project/kuberay#5124 tracks its removal. Every CRD feature added
since December 2023 is v1-only.

**Carrying it would import a silent correctness bug.** `crd-ref-docs`
derives anchors from the type name alone, and eleven type names are
defined in both API versions (`RayClusterSpec`, `WorkerGroupSpec`,
`RayJob`, `RayService`, `AutoscalerOptions`, ...). Only the v1 heading
owns the slug, so every v1alpha1 cross-link resolves to the v1
definition — with no warning at generation time. The definitions differ
substantially (`RayClusterSpec` has 14 fields in v1, 7 in v1alpha1), so
a reader following a v1alpha1 link lands on a table advertising fields
that don't exist in that version. Filed upstream as
kuberay-project/kuberay#5091.

Dropping the section resolves the collision rather than papering over
it. The stripping step is written to become a silent no-op once upstream
drops v1alpha1 from generation.

### The gcp-gke-tpu-cluster.md link

This one pointed at the MkDocs `/deploy/helm/` page, not the API
reference. That page documents Helm *chart values*, while the sentence
introducing it is about *installing* KubeRay. It's repointed at
`kuberay-operator-installation.md`, which is the maintained page for
what the sentence actually promises. The `helm repo add kuberay
https://ray-project.github.io/kuberay-helm/` commands elsewhere in the
docs are untouched — that's the Helm chart repository, a different host
from the docs site.

## Checks

**Anchor resolution.** The vendored page has 34 h1–h4 headings producing
34 distinct slugs (zero collisions, confirming the v1-only decision
eliminates that class) and 67 in-page anchor links across 31 distinct
targets, all resolving.

**Build.** Built the page in a minimal Sphinx project against the pinned
docs versions — sphinx 8.2.3, myst-parser 5.1.0 — with
`myst_heading_anchors = 4`, `nitpicky = True`, and `-W --keep-going`:

```
build succeeded.
exit 0
```

Zero warnings. Inspected the rendered HTML: all 134 internal `href`s
have a matching `id`, and none resolves to a docutils fallback `idN`.

This page depends on ray-project#65240 (h4 heading anchors), which has merged.
`crd-ref-docs` renders every CRD type as an h4 and cross-links types by
anchor, so the page could not build under the previous
`myst_heading_anchors = 3`.

A full `make rtd` build was not run locally; the docs CI build on this
PR is the check for that.

## Follow-ups (not in this PR)

**The sync job.** It diffs the processed upstream output against the
copy committed here — not against the previous upstream version — so
it's idempotent and self-healing: an unmerged sync PR gets updated
rather than duplicated, and a hand-edit here gets corrected on the next
run. Two open design points, discussed in the review thread:

- *What triggers it.* The semantically correct signal is the KubeRay
`release` event with `types: [released]`, which fires only for
non-prerelease publishes (every `-rc.N` tag is flagged `prerelease:
true`). A `push: tags` trigger would fire at Step 3 of the release
process, before images, charts, and validation. Until the workflow can
live in a repo that receives KubeRay events, the equivalent is a
scheduled poll of `GET /repos/ray-project/kuberay/releases/latest`,
which returns the maintainer-designated latest stable and so isn't
fooled by interleaved release lines (`v1.5.2` and `v1.6.1` published 22
seconds apart).
- *Whether Ray master should also carry a dev reference* built from
KubeRay `master`, alongside the stable one. Open question for the
maintainers.

**Remaining MkDocs-only content.** Several other pages on the MkDocs
site have no equivalent in the Ray docs — the Helm chart values tables,
additional `rayStartParams` coverage (`--no-monitor` and the autoscaler
READONLY rationale, `--block`, `--address` FQDN construction), and the
image tagging and registry scheme. Being handled separately.

## Related issue number

Depends on ray-project#65240 (merged). Related upstream: kuberay-project/kuberay#5091,
kuberay-project/kuberay#5124.

## AI assistance

AI assistance (Claude Code) was used for the anchor-collision analysis,
the release-mechanics analysis, the build verification, the
post-processing script, and drafting this description. I reviewed the
vendored content and the link changes and can defend both.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Signed-off-by: 400Ping <[email protected]>
dstrodtman added a commit that referenced this pull request Aug 28, 2026
## Why

The [KubeRay v1.7 blog](https://www.anyscale.com/blog/kuberay-v1-7)
highlights several features whose docs currently live only on `master`.
The corresponding pages are missing (404) or incomplete on the `latest`
(2.58.0) docs build, and several blog links point at `/master` as a
result. This backports the doc pages so the 2.58.0 `latest` docs cover
the released KubeRay v1.7 surface.

## What (cherry-picks onto `releases/2.58.0`)

| Commit | Blog feature | Gap on `latest` |
|---|---|---|
| #64303 | RayJob `SidecarMode` retry | new page was missing |
| #65249 | RayService incremental upgrade rollback (beta) | `#rollback`
section missing |
| #65074 | NetworkPolicy support (alpha) | new page was missing |
| #65429 | Embedded RocksDB GCS backend | example version pin missing |
| #65513 | Fix docs for KubeRay v1.7 | wrong NetworkPolicy field names +
incorrect `kubernetes` pip guidance |
| #65483 | Customizable Ingress options | `ingressOptions` undocumented
|

Each commit is applied with `cherry-pick -x` (provenance preserved) and
DCO sign-off.

## Not duplicating

- No open PR cherry-picks these into `releases/2.58.0` (checked by PR
number and by `--base releases/2.58.0`).
- The two History Server refinements (#65441, #65505) are intentionally
**excluded** — they already landed on `releases/2.58.0` (`c6061c10b97`,
`d8277b53b0d`) and that page is already identical to `master`.
- Broad, non-feature changes touching these files on `master` (llms.txt
page descriptions #65115, the "Ray Pod" terminology rename #65423, the
vendored CRD API reference #65428) are deliberately left out to keep
this a tight, low-risk release-branch backport.

## Testing

- Verified every new/changed page's `{ref}`/`{doc}` cross-reference
target resolves on this branch (`fail_on_warning: true` build safety).
- Verified both new toctree entries (`network-policy`,
`rayjob-sidecar-submitter-restart`) point at files that exist on the
branch.
- Confirmed each touched file matches `master` except for the
intentionally-excluded frontmatter/rename hunks above.
- A full local Sphinx docs build is recommended before marking ready for
review.

AI assistance (Claude Code) was used to prepare this backport.

---------

Signed-off-by: justinyeh1995 <[email protected]>
Signed-off-by: Justin Yeh <[email protected]>
Signed-off-by: JustinYeh <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Signed-off-by: win5923 <[email protected]>
Signed-off-by: Paul Nolan <[email protected]>
Signed-off-by: machichima <[email protected]>
Signed-off-by: wuallen57730 <[email protected]>
Co-authored-by: JustinYeh <[email protected]>
Co-authored-by: Jun-Hao Wan <[email protected]>
Co-authored-by: Pat O'Connor <[email protected]>
Co-authored-by: David Adamache <[email protected]>
Co-authored-by: Paul Nolan <[email protected]>
Co-authored-by: Nary Yeh <[email protected]>
Co-authored-by: Lima <[email protected]>
dstrodtman added a commit that referenced this pull request Aug 29, 2026
…#65428, #65618) (#65735)

Cherry-picks the vendored KubeRay CRD API reference onto
`releases/2.58.0`.

2.58.0 pins KubeRay v1.7. On master, #65428 vendored the KubeRay CRD API
reference into the Ray docs (`cluster/kubernetes/references/api.md`) and
repointed the references page and two guides from the external
`ray-project.github.io/kuberay/reference/api/` link to an internal
`{ref}` cross-reference; #65618 then synced the vendored reference to
KubeRay v1.7. Both landed after the branch cut, so the versioned 2.58.0
docs still link out to the external "latest" reference instead of the
pinned v1.7 CRDs.

This PR brings the release branch in line with the KubeRay v1.7 feature
docs backport.

Cherry-picks of #65428 and #65618.

Note: #65428 changes one line in
`getting-started/rayjob-quick-start.md`, which the KubeRay v1.7
feature-docs backport (#65730) also modifies. Whichever merges second
may need a trivial rebase.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…oject#65428)

## Why are these changes needed?

The KubeRay CRD API reference — the field-level reference for
`RayCluster`, `RayJob`, `RayService`, and `RayCronJob` — is published
only on the MkDocs site at `ray-project.github.io/kuberay`. That site
has two problems that compound each other:

- Its `mkdocs.yml` `nav:` block contains only `index.md`. The API
reference builds and serves but appears nowhere in site navigation, so
it's reachable only by direct URL, site search, or a search engine.
- Its landing page states that documentation has moved to
`ray-project/ray`.

Meanwhile `doc/source/cluster/kubernetes/references.md` here is a
~14-line stub whose entire substance is an outbound link to that page.
So Ray's documented answer for "what fields does a RayCluster support?"
is a link off-site to a nav-hidden page on a site that says it holds no
documentation. It's also the most actively updated file in the KubeRay
`docs/` tree — recent CRD features (`AuthOptions`, `GcsEmbeddedStorage`,
`NetworkPolicyRules`, `IngressOptions`, `HistoryServerOptions`,
`RayCronJob`) all extend it.

This vendors the generated reference into the Ray docs and repoints the
inbound links at it.

## What changed

| File | Change |
| --- | --- |
| `doc/source/cluster/kubernetes/references/api.md` | **New.** Vendored
generated reference, `ray.io/v1` only, from the `v1.6.2` release tag. |
| `doc/source/cluster/kubernetes/references.md` | Toctree entry; the
outbound link becomes a `{ref}`; added a note that v1alpha1 is
deprecated. |
| `doc/source/cluster/kubernetes/getting-started/rayjob-quick-start.md`
| Outbound link → `{ref}`. |
| `doc/source/cluster/kubernetes/user-guides/gcp-gke-tpu-cluster.md` |
Outbound link → the operator installation page (see below). |

Content-only: every changed file is under `doc/`, so the `docs-go`
label's scope guard (`ci/lint/validate_docs_go_scope.sh`) passes. An
earlier revision of this PR also added a `.github/CODEOWNERS` entry for
the generated file; it's dropped, both because it would have failed that
guard and because the existing `/doc/source/cluster/kubernetes/` rule
already assigns `@andrewsykim @ray-project/ray-core
@ray-project/ray-docs` — a more specific rule would have *narrowed*
ownership by dropping ray-core. The generated-file header is what deters
hand-edits.

### How the source artifact is produced

`docs/reference/api.md` in `ray-project/kuberay` is a committed build
artifact, not a hand-written page. `make api-docs` runs
`elastic/crd-ref-docs` (pinned v0.2.0) over the Go CRD types in
`ray-operator/apis/ray/`. The `ray-operator-verify-api-docs` job in
`.github/workflows/consistency-check.yaml` regenerates and diffs it on
every push and PR to `master` **and `release-*`**, failing on drift.

That CI job is what makes a vendored copy viable: freshness is already
enforced upstream, so the copy has a single well-defined source of
truth. Because the job covers `release-*` too, a release tag's `api.md`
is equally guaranteed consistent with that branch's CRD types.

### Why the `v1.6.2` release tag, not `master`

Per @andrewsykim's review, this now vendors from the latest KubeRay
release rather than from `master`. `master` carries CRD surface that no
release ships — diffing `docs/reference/api.md` at `v1.6.2` against
`master` is **+247 lines**, adding twelve types that exist in no
release:

`CollectorOptions`, `GcsEmbeddedStorage`, `GCSStorageDeletionPolicy`,
`GcsFaultToleranceBackend`, `HistoryServerOptions`, `IngressOptions`,
`IngressPathType`, `NetworkPolicyConfig`, `NetworkPolicyMode`,
`NetworkPolicyRules`, `TLSOptions`, `WorkerGroupNetworkPolicyRules`

plus field-level additions such as `priority`, `suspend`, `timeZone`,
and `command`/`args`.

The source ref is the **tag**, not the release branch head:
`release-1.6` is currently one commit ahead of `v1.6.2`. The page body
now states the KubeRay version, so the fields a reader sees are
attributable to a version they can install; the generated-file comment
records the tag and its commit SHA.

### Why `ray.io/v1` only

The upstream artifact documents both `ray.io/v1` and `ray.io/v1alpha1`.
This copy carries only v1, for two reasons.

**v1alpha1 is deprecated and on a removal runway.** It hasn't been the
storage version since v1.0 (October 2023), receives no new fields, and
kuberay-project/kuberay#5124 tracks its removal. Every CRD feature added
since December 2023 is v1-only.

**Carrying it would import a silent correctness bug.** `crd-ref-docs`
derives anchors from the type name alone, and eleven type names are
defined in both API versions (`RayClusterSpec`, `WorkerGroupSpec`,
`RayJob`, `RayService`, `AutoscalerOptions`, ...). Only the v1 heading
owns the slug, so every v1alpha1 cross-link resolves to the v1
definition — with no warning at generation time. The definitions differ
substantially (`RayClusterSpec` has 14 fields in v1, 7 in v1alpha1), so
a reader following a v1alpha1 link lands on a table advertising fields
that don't exist in that version. Filed upstream as
kuberay-project/kuberay#5091.

Dropping the section resolves the collision rather than papering over
it. The stripping step is written to become a silent no-op once upstream
drops v1alpha1 from generation.

### The gcp-gke-tpu-cluster.md link

This one pointed at the MkDocs `/deploy/helm/` page, not the API
reference. That page documents Helm *chart values*, while the sentence
introducing it is about *installing* KubeRay. It's repointed at
`kuberay-operator-installation.md`, which is the maintained page for
what the sentence actually promises. The `helm repo add kuberay
https://ray-project.github.io/kuberay-helm/` commands elsewhere in the
docs are untouched — that's the Helm chart repository, a different host
from the docs site.

## Checks

**Anchor resolution.** The vendored page has 34 h1–h4 headings producing
34 distinct slugs (zero collisions, confirming the v1-only decision
eliminates that class) and 67 in-page anchor links across 31 distinct
targets, all resolving.

**Build.** Built the page in a minimal Sphinx project against the pinned
docs versions — sphinx 8.2.3, myst-parser 5.1.0 — with
`myst_heading_anchors = 4`, `nitpicky = True`, and `-W --keep-going`:

```
build succeeded.
exit 0
```

Zero warnings. Inspected the rendered HTML: all 134 internal `href`s
have a matching `id`, and none resolves to a docutils fallback `idN`.

This page depends on ray-project#65240 (h4 heading anchors), which has merged.
`crd-ref-docs` renders every CRD type as an h4 and cross-links types by
anchor, so the page could not build under the previous
`myst_heading_anchors = 3`.

A full `make rtd` build was not run locally; the docs CI build on this
PR is the check for that.

## Follow-ups (not in this PR)

**The sync job.** It diffs the processed upstream output against the
copy committed here — not against the previous upstream version — so
it's idempotent and self-healing: an unmerged sync PR gets updated
rather than duplicated, and a hand-edit here gets corrected on the next
run. Two open design points, discussed in the review thread:

- *What triggers it.* The semantically correct signal is the KubeRay
`release` event with `types: [released]`, which fires only for
non-prerelease publishes (every `-rc.N` tag is flagged `prerelease:
true`). A `push: tags` trigger would fire at Step 3 of the release
process, before images, charts, and validation. Until the workflow can
live in a repo that receives KubeRay events, the equivalent is a
scheduled poll of `GET /repos/ray-project/kuberay/releases/latest`,
which returns the maintainer-designated latest stable and so isn't
fooled by interleaved release lines (`v1.5.2` and `v1.6.1` published 22
seconds apart).
- *Whether Ray master should also carry a dev reference* built from
KubeRay `master`, alongside the stable one. Open question for the
maintainers.

**Remaining MkDocs-only content.** Several other pages on the MkDocs
site have no equivalent in the Ray docs — the Helm chart values tables,
additional `rayStartParams` coverage (`--no-monitor` and the autoscaler
READONLY rationale, `--block`, `--address` FQDN construction), and the
image tagging and registry scheme. Being handled separately.

## Related issue number

Depends on ray-project#65240 (merged). Related upstream: kuberay-project/kuberay#5091,
kuberay-project/kuberay#5124.

## AI assistance

AI assistance (Claude Code) was used for the anchor-collision analysis,
the release-mechanics analysis, the build verification, the
post-processing script, and drafting this description. I reviewed the
vendored content and the link changes and can defend both.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants