8000 Automate GEP TOC generation and validate by rikatz · Pull Request #4075 · kubernetes-sigs/gateway-api · GitHub
[go: up one dir, main page]

Skip to content

Conversation

rikatz
Copy link
Member
@rikatz rikatz commented Sep 8, 2025

What type of PR is this?
/kind documentation

What this PR does / why we need it:
This PR adds a new program capable of reading the GEPs and generating the proper TOC file for the website.

Additionally it adds some shellscripts to help verifying and generating/updating the TOC accordingly.

To keep the consistency, the GEP TOC is ordered Alphabetically, on the first level being the GEP type, and on the second level by the GEP number.

To be able to use the GEP API, some GEPs had to be fixed to proper represent an empty array of string, that is different from an empty object

The changes are splitted on 3 commits:

  1. Fix GEP API and the metadata.yaml from GEPs
  2. Implement the generator and changes mkdocs to use the nav.yml file
  3. Commit of the generated nav.yml file

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 8, 2025
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/gep PRs related to Gateway Enhancement Proposal(GEP) size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 8, 2025
@rikatz
Copy link
Member Author
rikatz commented Sep 8, 2025

I am intentionally sending a broken PR to show how the CI will reflect the miss of GEP update, and then I will commit the changes to the TOC for the next run

@rikatz
Copy link
Member Author
rikatz commented Sep 8, 2025

@rikatz rikatz force-pushed the fix-gep-toc branch 4 times, most recently from e52feef to 20f6dcd Compare September 8, 2025 23:56
@rikatz
Copy link
Member Author
rikatz commented Sep 9, 2025

Copy link
Member
@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @rikatz!

@kflynn
Copy link
Contributor
kflynn commented Sep 16, 2025

@rikatz This looks great after the extends stanza are dealt with -- thanks much!! 🙂

@youngnick
Copy link
Contributor

Two things I'd like to see here, as discussed in the community meeting:

  • explore if we can include just the nav: section from another file.
  • For any generated files, ensure that the generation puts a notice at the top of the file saying "Generated, do not edit, update instead, then run make generate", so that folks won't make changes in the wrong place.

I think once my mistake about the json tags is fixed, and the second bullet point is done, this is good to merge. If exploring includes will take a long time, I think it's better to get this change in and iterate.

I'll approve, so that someone else can LGTM later.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rikatz, youngnick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 17, 2025
@rikatz
Copy link
Member Author
rikatz commented Sep 17, 2025

/hold

I will just fix these commits to separate what's mkdocs fixes from what's GEP API fixes

The GEP API is using a wrong structure/tag name for some
fields, so this PR fixes the markers.

Additionally the metadata.yaml files from some GEPs are
fixed to reflect the right GEP API structure
This change makes the navigation section of GW API website
to be generated.

The modification adds a new Go program that is able to transverse
the GEP directory and generate a navigation section correctly from
the existing GEPs.

Additionally, some scripts and Makefiles are added to verify if the
generated nav.yml file reflects the current state of GEPs, a Github
Action that fails in case nav.yml is outdated
@rikatz
Copy link
Member Author
rikatz commented Sep 17, 2025

/hold cancel
PR is ready to merge.

The changes are splitted on 3 commits:

  1. Fix GEP API and the metadata.yaml from GEPs
  2. Implement the generator and changes mkdocs to use the nav.yml file
  3. Commit of the generated nav.yml file

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 17, 2025
@rikatz
Copy link
Member Author
rikatz commented Sep 17, 2025

@youngnick I have fixed to use an external nav.yml :) All good for now.

My only comment is that to keep it "simple" (for the verification, etc) I am adding the "Warning" about generated file on the nav.yml.tmpl letting the user know if they are editting nav.yml they shouldn't. But I can also add it to the go program, tho the program is effectively a template parser, and not a file generator :)

lmk what you think

@snorwin
Copy link
Member
snorwin commented Sep 17, 2025

Thanks @rikatz! I compared the generated nav.yml with the previous one, and everything looks correct. The code looks good as well, so I think we’re good to go.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5c450a3 into kubernetes-sigs:main Sep 17, 2025
32 checks passed
shaneutt pushed a commit that referenced this pull request Sep 17, 2025
* Fix GEP API and geps metadata

The GEP API is using a wrong structure/tag name for some
fields, so this PR fixes the markers.

Additionally the metadata.yaml files from some GEPs are
fixed to reflect the right GEP API structure

* Implement automatic NAV generation

This change makes the navigation section of GW API website
to be generated.

The modification adds a new Go program that is able to transverse
the GEP directory and generate a navigation section correctly from
the existing GEPs.

Additionally, some scripts and Makefiles are added to verify if the
generated nav.yml file reflects the current state of GEPs, a Github
Action that fails in case nav.yml is outdated

* Add the new generated nav file
@mikemorris
Copy link
Contributor

Was excluding Provisional GEPs from the nav an intentional change in this refactor? I personally find these to be some of the more important GEPs to surface, as they're typically intended for active review and feedback before the proposal moves forward to implementable.

@rikatz
Copy link
Member Author
rikatz commented Oct 1, 2025

Was excluding Provisional GEPs from the nav an intentional change in this refactor? I personally find these to be some of the more important GEPs to surface, as they're typically intended for active review and feedback before the proposal moves forward to implementable.

yeah it was, look: #4075 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0