Add support to generate reference docs for kube components#47
Add support to generate reference docs for kube components#47steveperry-53 merged 1 commit intokubernetes-sigs:masterfrom
Conversation
754aa1a to
6ef13e5
Compare
|
@tengqm Travis failed: travis_time:end:0971c169:start=1524018539424712844,finish=1524018543151904299,duration=3727191455
�[0Ktravis_fold:end:rvm
�[0K$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
$ rvm --version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ bundle --version
Bundler version 1.16.1
$ gem --version
2.7.6
travis_time:start:01565834
�[0K$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/travis/.rvm/gems/ruby-2.4.1@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
travis_time:end:01565834:start=1524018543662891381,finish=1524018543816947599,duration=154056218
�[0K
�[31;1mThe command "rake" exited with 1.�[0m
Done. Your build exited with 1. |
|
/assign |
|
@chenopis: GitHub didn't allow me to assign the following users: chenopis. Note that only kubernetes-incubator members and repo collaborators can be assigned. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@chenopis Travis has been failing for a long time I guess. It is a different issue to fix. The project needs a '.travis.yml' file for CI. |
|
@tengqm What should we do w/ this PR then? How do we verify it so that it can be merged? /assign janetkuo |
|
@chenopis Will try fix travis CI. |
f489169 to
d67dd96
Compare
This adds Markdown generators for the following kube components: - cloud-controller-manager - kube-apiserver - kube-controller-manager - kube-proxy - kube-scheduler - kubelet - kubeadm The generator logic is based on the doc generator logic from cobra. The main difference from the builtin markdown generator is that we are generating HTML tables for the kube component options. The logic is applicable to kubeadm as well. Note that the vendored source files are removed in this PR because they are making the doc generation dependent to the vendored version.
|
@chenopis Added travis gate ci config. Now the gate is up and running. I think the PR is ready to go now. Will continue (in another PR) to stand up CI jobs for API doc and CLI doc generation. |
|
@tengqm Ok, great! I don't have merge rights in this repo, so we'll have to wait for one of the kubernetes-incubator maintainers. |
|
/cc foxish |
|
@pwittrock can you help get this PR merged? We need it for kubeadm docs for 1.11 and it's currently a blocker on some docs PRs. Thanks! |
|
I just started looking at this. But at first glance, I don't understand why we would want 20,000 files here in the kubernetes-incubator/reference-docs repository. And I don't understand why we would shift the code that generates components like kube-apiserver from kubernetes/kubernetes into kubernetes-incubator/reference-docs. |
|
I'm inclined to agree with Steve. I realized another thing, too, though, while reviewing this docs PR -- HTML formatting makes it impossible to diff with newer or older versions that don't have it. This is obvious, but until we get this PR sorted, we cannot diff generated files that contain new content. This is particularly a problem for the kubeadm docs, which are a mix of manually curated and generated content, and really should be reviewed in toto when a PR for manual content is submitted. @steveperry-53 it looks to me as though most of those 20,000 files are the result of vendoring. But that's just a guess -- I certainly don't have the bandwidth even to spot-check the whole diff, assuming I knew how to get it which I don't. @tengqm could we add just the code that formats the tables to the existing generators in k/k? And to other places wherever it's needed? (I'm not sure, for example, where the generator is for the kubeadm docs ... I did not build those for 1.10) |
|
There is a long story behind this change. Let me try summarize the key points as Q&A below: Q: Why this PR is changing more than 20 thousand files? Q: Can we generate reference docs from within kubernetes/kubernetes project?
Q: Why don't we try patch spf13/cobra package directly? Q: Is the revised doc generator making doc reviews difficult? Q: Does the revised tool work or not? Is it only working on tengqm's workstation? Q: Vendoring is a common practices in Go community, why are we killing the vendored packages? Q: How big a change this PR is? |
|
@tengqm Thanks for the explanation. I understand what's going on now. And I totally agree that we should not keep vendored files here in the repository. |
|
@tengqm Are there any updates required to https://kubernetes.io/docs/home/contribute/generated-reference/kubernetes-components/? +1 to getting rid of vendored files. |
This adds Markdown generators for the following kube components:
The generator logic is based on the doc generator logic from cobra.
The main difference from the builtin markdown generator is that we are
generating HTML tables for the kube component options.
The logic is applicable to kubeadm as well.