-
Notifications
You must be signed in to change notification settings - Fork 109
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
create simplified kubectl ref #132
Conversation
kbhawkey
commented
Jan 27, 2020
•
edited
Loading
edited
- Built simple, single page kubectl command reference.
- [TODO] Description, Usage, Examples text. Really any descriptive text should be converted or cleaned up. I found that the text has a number of markup and special chars such as: important note (!!!), embedded links, embedded lists. Newlines could be preserved and whitespace. Possibly convert Markdown snippets to HTML (goldmark), then run through golang template.Html.
- [TODO] Overall page styling needs more work. Determine colors, highlight text, etc. Verify static assets and clean up.
- [TODO] Remove static-includes directory and files and update setup script.
- Flags are presorted (alphabetical); does this need additional verification.
- [TODO] Add table captions (Aria).
- Simplified Makefile
- See issue migrate kubectl reference #118.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kbhawkey The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @tengqm |
for _, c := range toc.Categories { | ||
|
||
// Write each of the commands in this category | ||
for _, cm := range c.Commands { |
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.
any consideration on the ordering of values in the map?
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.
maybe it is okay at this stage ... eventually we need an ordered list of the commands and options so that the output can be easily compared to each other.
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.
Yes, thinking of sorting the commands based on the order/grouping of commands in toc.yaml. I updated toc.yaml to match the output of kubectl help
.
Ideally, the group name/message would be provided by the spec (or kubectl help).
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.
The commands are ordered per category and the sub-commands are provided through the spec. The categories are sorted by the groupings in the toc.yaml file.
I guess the order of the sub-commands and options could change from release to release. I think sorting the flags/options would be beneficial.
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.
ok
gen-kubectldocs/generators/html.go
Outdated
"<tbody>" | ||
|
||
for _, option := range cmd.Options { | ||
buf += "<tr><td>" + option.Name + "</td><td>" + option.Shorthand + "</td><td>" + |
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.
option.Name may need some tags like <code>
.
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.
👍
2c93d8b
to
11b9ed0
Compare
add categories more updates updates
11b9ed0
to
ad8bee2
Compare
@kbhawkey Is this still a WIP? Can we kick it in and iterate over it? |
@tengqm , This is sort of a WIP. I started to work on cleaning up the Examples section, but have not gotten back to it yet. I was not sure if there was any interest in this PR. |
@kbhawkey You are right we need to tune the look&feel of examples. There are other things to tune as well, such as the style for the left navigator. I was hoping that we can make it auto-hiding. |
Since it has been some time, I will look at the state of the changes (and changes I made but did not merge in yet). |
@@ -0,0 +1,61 @@ | |||
categories: | |||
- name: GETTING STARTED |
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.
Around content organization, perhaps a grouping could be APPLICATION MANAGEMENT
?
Going even further, I'd prefer to have groupings for IMPERATIVE APPLICATION MANAGEMENT
and DECLARATIVE APPLICATION MANAGEMENT
to mirror the corresponding doc sections under Manage Kubernetes Objects:
Declarative Management of Kubernetes Objects Using Configuration Files
Declarative Management of Kubernetes Objects Using Kustomize
Managing Kubernetes Objects Using Imperative Commands
Imperative Management of Kubernetes Objects Using Configuration Files
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.
@julianvmodesto, Should the group names be restricted to a specific length? The names are part of the left navigation.
Is it possible for kubectl
to provide the groupings or categories. The toc could be dynamically generated instead of manually updated whenever the commands change.
I think there is an issue/PR in spf13/cobra requesting something like this (spf13/cobra#836).
Before adding this in, is there time (v1.18 release) to get the reference to a point where it is no longer a draft and is an acceptable replacement for the current kubectl command reference (granted I think the current ref is difficult to use and looks outdated). |
Placing a hold on this again. |
/close |
@kbhawkey: Closed this PR. In 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. |
@kbhawkey: PR needs rebase. 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. |