Repository navigation
[docs] vendor the KubeRay CRD API reference into the Ray docs - #65428
Conversation
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
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.
| 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. |
3df0465 to
4f5289b
Compare
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]>
4f5289b to
7591561
Compare
|
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? |
|
just saw kuberay-project/kuberay#5092 (comment) :) |
|
@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). |
|
To be clear, I'm not sure we should continously sync CRDs in KubeRay |
…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]>
|
@andrewsykim agreed, and you're right that it already bit this PR — the first revision vendored from Concretely,
plus field-level additions like What I found reading the release processSome of this constrains the sync design, so writing it down:
Trigger
The right signal is the Since neither 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
That last one documents fields that only exist in the So one option is: on the Ray Two implications if we go that way:
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]>
|
@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:
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]>
|
Pushed one more commit, 82588d5, so this page matches what the sync job now generates.
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. |
…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]>
## 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]>
…#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]>
…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]>
Why are these changes needed?
The KubeRay CRD API reference — the field-level reference for
RayCluster,RayJob,RayService, andRayCronJob— is published only on the MkDocs site atray-project.github.io/kuberay. That site has two problems that compound each other:mkdocs.ymlnav:block contains onlyindex.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.ray-project/ray.Meanwhile
doc/source/cluster/kubernetes/references.mdhere 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 KubeRaydocs/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
doc/source/cluster/kubernetes/references/api.mdray.io/v1only, from thev1.6.2release tag.doc/source/cluster/kubernetes/references.md{ref}; added a note that v1alpha1 is deprecated.doc/source/cluster/kubernetes/getting-started/rayjob-quick-start.md{ref}.doc/source/cluster/kubernetes/user-guides/gcp-gke-tpu-cluster.mdContent-only: every changed file is under
doc/, so thedocs-golabel's scope guard (ci/lint/validate_docs_go_scope.sh) passes. An earlier revision of this PR also added a.github/CODEOWNERSentry 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.mdinray-project/kuberayis a committed build artifact, not a hand-written page.make api-docsrunselastic/crd-ref-docs(pinned v0.2.0) over the Go CRD types inray-operator/apis/ray/. Theray-operator-verify-api-docsjob in.github/workflows/consistency-check.yamlregenerates and diffs it on every push and PR tomasterandrelease-*, 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'sapi.mdis equally guaranteed consistent with that branch's CRD types.Why the
v1.6.2release tag, notmasterPer @andrewsykim's review, this now vendors from the latest KubeRay release rather than from
master.mastercarries CRD surface that no release ships — diffingdocs/reference/api.mdatv1.6.2againstmasteris +247 lines, adding twelve types that exist in no release:CollectorOptions,GcsEmbeddedStorage,GCSStorageDeletionPolicy,GcsFaultToleranceBackend,HistoryServerOptions,IngressOptions,IngressPathType,NetworkPolicyConfig,NetworkPolicyMode,NetworkPolicyRules,TLSOptions,WorkerGroupNetworkPolicyRulesplus field-level additions such as
priority,suspend,timeZone, andcommand/args.The source ref is the tag, not the release branch head:
release-1.6is currently one commit ahead ofv1.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/v1onlyThe upstream artifact documents both
ray.io/v1andray.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-docsderives 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 (RayClusterSpechas 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 atkuberay-operator-installation.md, which is the maintained page for what the sentence actually promises. Thehelm 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:Zero warnings. Inspected the rendered HTML: all 134 internal
hrefs have a matchingid, and none resolves to a docutils fallbackidN.This page depends on #65240 (h4 heading anchors), which has merged.
crd-ref-docsrenders every CRD type as an h4 and cross-links types by anchor, so the page could not build under the previousmyst_heading_anchors = 3.A full
make rtdbuild 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:
releaseevent withtypes: [released], which fires only for non-prerelease publishes (every-rc.Ntag is flaggedprerelease: true). Apush: tagstrigger 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 ofGET /repos/ray-project/kuberay/releases/latest, which returns the maintainer-designated latest stable and so isn't fooled by interleaved release lines (v1.5.2andv1.6.1published 22 seconds apart).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
rayStartParamscoverage (--no-monitorand the autoscaler READONLY rationale,--block,--addressFQDN 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.