kubernetes-sigs / reference-docs

Tools to build reference documentation for Kubernetes APIs and CLIs.
Apache License 2.0
90 stars 105 forks source link

Fix doc strings for kubeadm config #238

Closed tengqm closed 3 years ago

tengqm commented 3 years ago

There are some strange format in the kubeadm comment that led to weird output for the generated reference. This PR fixes them.

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/reference-docs/blob/master/OWNERS)~~ [tengqm] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
sftim commented 3 years ago

I'm happy to review this but don't actually know the steps to check it's accurate.

Do we have a guide to that?

tengqm commented 3 years ago

@sftim This is a trivial update to existing code base. The kubeadm config is deeply embedded in the Kubernetes/kubernetes code base, but k8s.io/kubernetes cannot be imported directly for parsing. So the workaround, as suggested by some contributors was to clone the upstream source (especially the types.go) files for parsing. For that reason, I cloned the related source code into github.com/tengqm/kubeconfig repo and then parse it.

Regarding this PR, it bumps the version of the github.com/tengqm/kubeconfig module. In the latest revision, we further cleaned the doc.go file where there are bad TABs found in the comments. Such comments, as @kbhawkey has spotted, are leading us to incorrect sample YAML data.

kbhawkey commented 3 years ago

Hi @tengqm . I assume that this PR updates the genref tool and the generated configuration reference pages. The changes are based on files found in github.com/tengqm/kubeconfig: https://github.com/tengqm/kubeconfig/blob/master/config/kubeadm/v1beta1/doc.go https://github.com/tengqm/kubeconfig/blob/master/config/kubeadm/v1beta2/doc.go

tengqm commented 3 years ago

@kbhawkey Correct.

kbhawkey commented 3 years ago

/kind cleanup

kbhawkey commented 3 years ago

Hi. The formatting changes look okay. Does the tool need more detailed documentation? It would be helpful to explain any dependencies or known issues with upstream source/libraries. What workarounds are used to build the configuration references? Thanks @tengqm . /lgtm