You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate reference documentation for agentgateway (${{ needs.setup.outputs.api_file }}).
168
184
169
185
Source: kgateway-dev/kgateway at `${{ needs.setup.outputs.ref }}`.
170
-
Updates API reference, Helm (agentgateway + agentgateway-crds), and control plane metrics for the ${{ needs.setup.outputs.directory }} version.
186
+
Updates API reference (including shared types such as CEL expression), Helm (agentgateway + agentgateway-crds), and control plane metrics for the ${{ needs.setup.outputs.directory }} version.
171
187
172
188
This PR was created automatically by the reference-docs workflow.
Copy file name to clipboardExpand all lines: scripts/README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,17 @@ The workflow and `generate-ref-docs.py` read this file to decide which ref to us
21
21
22
22
Configuration for [crd-ref-docs](https://github.com/elastic/crd-ref-docs). Used when generating Kubernetes API reference docs from kgateway’s `api/v1alpha1/agentgateway` types. The workflow passes this as `--config` to `go run github.com/elastic/crd-ref-docs@latest`.
23
23
24
+
### `generate-shared-types.py`
25
+
26
+
Python script that appends **shared types** documentation (e.g. CEL expression) to the generated API reference markdown. It parses Go source in kgateway’s shared and agentgateway packages, finds broken type links in the API doc, and appends markdown for those types so crd-ref-docs output is complete. The workflow runs it after writing the API doc:
-**shared_dir** – e.g. `kgateway/api/v1alpha1/shared`
30
+
-**doc_file** – e.g. `website/assets/agw-docs/pages/reference/api/api-22x.md`
31
+
-**source_dir** (optional) – e.g. `kgateway/api/v1alpha1/agentgateway`
32
+
33
+
If the doc file is missing, the script is skipped. If `shared_dir` does not exist, the script still runs and uses any provided source dirs.
34
+
24
35
### `generate-ref-docs.py`
25
36
26
37
Python script that generates **Helm** and **metrics** reference docs only (API docs are generated in the workflow). It expects:
@@ -40,7 +51,8 @@ Requires Go (for helm-docs and findmetrics). No cloning; the workflow checks out
40
51
41
52
1.**Setup job** – Checks out the website, reads `scripts/versions.json`, resolves the kgateway ref for the chosen doc version, and verifies that branch exists.
42
53
2.**API docs step** – Checks out kgateway at that ref, runs crd-ref-docs with `scripts/crd-ref-docs-config.yaml`, and writes API markdown to `assets/agw-docs/pages/reference/api/{apiFile}`.
43
-
3.**Helm and metrics step** – Runs `scripts/generate-ref-docs.py` with `DOC_VERSION`, `WEBSITE_DIR=website`, and `KGATEWAY_DIR=kgateway` so the script generates Helm and metrics into the website tree.
44
-
4.**Create PR** – Commits all changes under the website path and opens a PR.
54
+
3.**Shared types step** – Runs `scripts/generate-shared-types.py` with kgateway’s shared and agentgateway API dirs and the API doc file, appending documentation for shared types (e.g. CEL) that crd-ref-docs does not emit.
55
+
4.**Helm and metrics step** – Runs `scripts/generate-ref-docs.py` with `DOC_VERSION`, `WEBSITE_DIR=website`, and `KGATEWAY_DIR=kgateway` so the script generates Helm and metrics into the website tree.
56
+
5.**Create PR** – Commits all changes under the website path and opens a PR.
45
57
46
58
To add a new doc version (e.g. 2.4.x), add an entry to `versions.json` with the appropriate `apiFile`, `kgatewayRef`, and `metricsSnippet`, then run the workflow with that version.
0 commit comments