-
Notifications
You must be signed in to change notification settings - Fork 23
docs: add script to run kubectl explain on all crds #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add a script that given the root CRD name, will run `kubectl explain` on all <Object> and sub-<Object> fields and pipe the output to a txt file that is checked in. Also add `make explain` to the Makefile to automate the running of the script. This serves two purposes: 1) Documents the CRDs in an easily readable format for users of the CRD. 2) Currently needs to be manually run, but shows how changes to the API effect the CRDs. This could be automated in the github workflow if the CRDs are loaded into a Kubernetes cluster in github actions. Signed-off-by: Billy McFall <[email protected]>
Update OWNERS
The fundamental question is whether the slightly improved readability of kubectl explain output justifies having two copies of the same API documentation in the tree. Other concerns: this doesn't actually catch regressions unless someone actively reads the output. Without a mechanism to fail the build when CRD structure changes unexpectedly or validate breaking changes, I worry this becomes write-only documentation. |
First, I'm fine if you don't want this, just letting you see what I had.
The "improved readability" also shows spacing. If you look at fields that the description is in pulled in modules, like
Not the end of the world, but would like our descriptions to be as clean as possible. As far as two copies, I think you are referring to Kubernetes CRD API-Reference as the first copy? I think my version is easier to read and the docs are way outdated since they are only getting updated on releases (maybe should update them soon if a release isn't imminent).
This isn't here yet, but I was thinking if we have the CRDs loaded in a cluster in any of CI, we could something like we do with the bundle, I just didn't dig to see if this was possible:
|
ah. nope. :) I wasn't aware of the developer-guide (link). If you're working in the tree, then my "two copies" comment was the source in |
Add a script that given the root CRD name, will run
kubectl explain
on all <Object> and sub-<Object> fields and pipe the output to a txt file that is checked in. Also addmake explain
to the Makefile to automate the running of the script. This serves two purposes: