Repository navigation
[cherry-pick][2.58.0][docs] Vendor the KubeRay v1.7 CRD API reference (#65428, #65618) - #65735
Merged
dstrodtman merged 2 commits intoAug 29, 2026
Merged
Conversation
## 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 #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.
---------
Signed-off-by: Douglas Strodtman <[email protected]>
(cherry picked from commit 83a8eb5)
Signed-off-by: Douglas Strodtman <[email protected]>
## Why are these changes needed? Refreshes the generated KubeRay CRD API reference at `doc/source/cluster/kubernetes/references/api.md` from `ray-project/kuberay` release tag v1.7.0, pinned at commit [`97509c3`](https://github.com/ray-project/kuberay/blob/97509c3a7216cf3440af381646560a1885afb53b/docs/reference/api.md). Opened automatically. The upstream file is a build artifact that `elastic/crd-ref-docs` generates from the Go CRD types in `ray-operator/apis/ray/`, and KubeRay's `ray-operator-verify-api-docs` CI job fails on drift between the two, so the content is verified upstream before it reaches here. That job covers `release-*` branches as well as `master`, so a release tag's artifact carries the same guarantee. This syncs from the latest KubeRay *release*, not from `master`. Master carries CRD surface that no release ships, and documenting it here would advertise fields a reader can't use. The `ray.io/v1alpha1` section is stripped on the way in. That API version is deprecated and on a removal runway (kuberay-project/kuberay#5124), and its cross-links collide with the v1 anchors (kuberay-project/kuberay#5091). With one package left, the `Packages` index and the `ray.io/v1` heading restate the page's own subject, so both are dropped and the headings under them move up to h2. Sphinx's right-hand page nav lists h2 only, so this is what puts the CRD types in it. Heading text is untouched, so the anchors cross-links resolve against don't move. A page intro replaces the generated package blurb those headings carried, naming the resource types read off the page's own index. Prose that a Go doc comment indented with a tab becomes a list, and the non-breaking hyphen those comments carry becomes an ASCII one. Tab indentation is godoc's code-block convention, so `crd-ref-docs` passes it through and the renderer turns the sentences into a preformatted block. Both belong upstream (kuberay-project/kuberay#5146) and this step drops out once they're fixed there. ## Checks Content-only: the single changed file is documentation under `doc/`, so the `docs-go` scope guard applies cleanly. The Read the Docs preview build on this PR is the gate — a green build means the regenerated reference still renders and all of its in-page anchors resolve. Nothing else in this PR. If it contains any other change, something is wrong with the sync job. Signed-off-by: Douglas Strodtman <[email protected]> (cherry picked from commit 624b0ee) Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds the generated KubeRay CRD API reference for version 1.7.0 as a new local documentation file (doc/source/cluster/kubernetes/references/api.md). It updates various documentation pages to use internal references to this new API reference rather than external links, adds a hidden toctree entry, and includes a deprecation notice for the ray.io/v1alpha1 API version. There are no review comments, and I have no feedback to provide.
elliot-barn
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 externalray-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.