-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Generating API reference docs for federation apiserver #31759
Generating API reference docs for federation apiserver #31759
Conversation
…uncs for federation gvs
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message will repeat several times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message will repeat several times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message will repeat several times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. |
@k8s-bot ok to test |
URLs to view the generated files: |
@@ -3,6 +3,10 @@ | |||
"apiVersion": "", | |||
"basePath": "https://10.10.10.10:6443", | |||
"resourcePath": "/api", | |||
"info": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These got added as a result of #30914.
These fields are part of the spec, go-restful might have recently added support for it.
Review status: 0 of 22 files reviewed at latest revision, 5 unresolved discussions. hack/update-api-reference-docs.sh, line 38 [r2] (raw file):
This looks to be copied from the original code, but I think using kube::util::group-version-to-pkg-path will make it cleaner. hack/update-federation-api-reference-docs.sh, line 40 [r2] (raw file):
Same here, using kube::util::group-version-to-pkg-path seems better. hack/lib/swagger.sh, line 79 [r2] (raw file):
Are these two lines redundant? Comments from Reviewable |
Just some minor comments and a question on what the generated code is. Review status: 0 of 22 files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
A few minor comments, but looks good otherwise. I will however let @caesarxuchao to add the LGTM label. Reviewed 2 of 14 files at r1. federation/apis/swagger-spec/apis.json, line 6 [r1] (raw file):
Same as @caesarxuchao's previous comment. federation/apis/swagger-spec/extensions.json, line 6 [r1] (raw file):
Same as above. federation/apis/swagger-spec/extensions_v1beta1.json, line 6 [r1] (raw file):
Same as above. federation/apis/swagger-spec/extensions_v1beta1.json, line 2858 [r1] (raw file):
A little curious about why this is here. federation/apis/swagger-spec/federation.json, line 6 [r1] (raw file):
Same comment as above and in all the many following occurrences. hack/update-federation-generated-swagger-docs.sh, line 3 [r1] (raw file):
2016? Comments from Reviewable |
I see a stray Articles preceding "Ingress" are all incorrect. For example, Do we allow reading the scale subresource in federation? If not we should remove it from this doc here. Also, the headings for Scale subresources should be fixed. This is also a problem in Kubernetes reference docs, not specific to Federation. For example, Watch documentation ordering is pretty weird. (Also applies to Kubernetes). Any why we list watch in the end and everything else with the corresponding resources? |
Review status: 2 of 22 files reviewed at latest revision, 11 unresolved discussions. federation/apis/swagger-spec/extensions_v1beta1.json, line 2858 [r1] (raw file):
|
Yes it is possible to fix it. That doc is generated here: kubernetes/pkg/apiserver/api_installer.go Line 599 in 1063731
Yes, we support replicasets/scale:
|
Pushed a new commit as per comments, PTAL. |
Review status: 2 of 22 files reviewed at latest revision, 11 unresolved discussions. federation/apis/swagger-spec/extensions_v1beta1.json, line 2858 [r1] (raw file):
|
Fixing it there would change it for all the resources unless we actually semi-smart article detector right? My question was more on the lines of fixing it only for Ingress.
Cool! Thanks for confirming. |
Yes, need to use an article detector. Other option will be to add an if there hardcoding ingress :) |
Thank you both! LGTM. |
f9267c9
to
633c549
Compare
Squashed the last commit, thanks! |
GCE e2e build/test passed for commit 633c549. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 633c549. |
Automatic merge from submit-queue |
Sent kubernetes/website#1143 to import these docs on k8s.io |
Automatic merge from submit-queue Adding a README for federation API ref docs The API ref docs were added in #31759 README makes it easy to link to all other API-ref docs. This is similar to the existing docs/api-reference/README.md for kubernetes. cc @kubernetes/sig-cluster-federation @caesarxuchao
Automatic merge from submit-queue Adding a README for federation API ref docs The API ref docs were added in kubernetes#31759 README makes it easy to link to all other API-ref docs. This is similar to the existing docs/api-reference/README.md for kubernetes. cc @kubernetes/sig-cluster-federation @caesarxuchao (cherry picked from commit e10b061)
Automatic merge from submit-queue Adding a README for federation API ref docs The API ref docs were added in kubernetes#31759 README makes it easy to link to all other API-ref docs. This is similar to the existing docs/api-reference/README.md for kubernetes. cc @kubernetes/sig-cluster-federation @caesarxuchao (cherry picked from commit e10b061)
Automatic merge from submit-queue Adding a README for federation API ref docs The API ref docs were added in kubernetes/kubernetes#31759 README makes it easy to link to all other API-ref docs. This is similar to the existing docs/api-reference/README.md for kubernetes. cc @kubernetes/sig-cluster-federation @caesarxuchao
Fixes #30541
Adding a script
update-federation-api-reference-docs.sh
similar to the existingupdate-api-reference-docs.sh
for kube-apiserver. Have moved the common parts tohack/lib/swagger.sh
.The new script will produce API reference docs for federation-apiserver.
Next step will be to surface these docs at kubernetes.io.
cc @kubernetes/sig-cluster-federation @kubernetes/sig-api-machinery @caesarxuchao
This change is