karmadactl: add the ability to automatically generate user guidance documents for the command line#2260
karmadactl: add the ability to automatically generate user guidance documents for the command line#2260Fish-pro wants to merge 1 commit intokarmada-io:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
karmadactlkarmadactl controls a Kubernetes Cluster Federation. Synopsiskarmadactl controls a Kubernetes Cluster Federation. OptionsSEE ALSO
Auto generated by spf13/cobra on 26-Jul-2022 |
a82f283 to
845e7be
Compare
Signed-off-by: chen zechun <zechun.chen@daocloud.io>
845e7be to
ef169c3
Compare
|
/cc @Tingtal |
Tingtal
left a comment
There was a problem hiding this comment.
Pls check my edits on the language. Thanks
| ### Options | ||
|
|
||
| ``` | ||
| --add-dir-header If true, adds the file directory to the header of the log messages |
There was a problem hiding this comment.
| --add-dir-header If true, adds the file directory to the header of the log messages | |
| --add-dir-header If true, add the file directory to the header of the log messages |
| --alsologtostderr log to standard error as well as files | ||
| -h, --help help for karmadactl | ||
| --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. | ||
| --log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0) |
There was a problem hiding this comment.
| --log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0) | |
| --log-backtrace-at traceLocation When logging hits line file:N, emit a stack trace (default 0) |
|
|
||
| ``` | ||
| --add-dir-header If true, adds the file directory to the header of the log messages | ||
| --alsologtostderr log to standard error as well as files |
There was a problem hiding this comment.
| --alsologtostderr log to standard error as well as files | |
| --alsologtostderr Log to standard error as well as files |
| ``` | ||
| --add-dir-header If true, adds the file directory to the header of the log messages | ||
| --alsologtostderr log to standard error as well as files | ||
| -h, --help help for karmadactl |
There was a problem hiding this comment.
| -h, --help help for karmadactl | |
| -h, --help Help for karmadactl |
| --log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0) | ||
| --log-dir string If non-empty, write log files in this directory | ||
| --log-file string If non-empty, use this log file | ||
| --log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800) |
There was a problem hiding this comment.
| --log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800) | |
| --log-file-max-size uint Define the maximum size a log file can grow to, in unit of megabyte. Value 0 indicates unlimited file size. (Default to 1800) |
| --cluster-kubeconfig string Path of the cluster's kubeconfig. | ||
| --cluster-namespace string Namespace in the control plane where member cluster secrets are stored. (default "karmada-cluster") | ||
| --dry-run Run the command in dry-run mode, without making any server requests. | ||
| --force Delete cluster and secret resources even if resources in the cluster targeted for unjoin are not removed successfully. |
There was a problem hiding this comment.
| --force Delete cluster and secret resources even if resources in the cluster targeted for unjoin are not removed successfully. | |
| --force Delete cluster and secret resources even if resources in the unjoining cluster are not removed successfully. |
| --force Delete cluster and secret resources even if resources in the cluster targeted for unjoin are not removed successfully. | ||
| -h, --help help for unjoin | ||
| --karmada-context string Name of the cluster context in control plane kubeconfig file. | ||
| --wait duration wait for the unjoin command execution process(default 60s), if there is no success after this time, timeout will be returned. (default 1m0s) |
There was a problem hiding this comment.
| --wait duration wait for the unjoin command execution process(default 60s), if there is no success after this time, timeout will be returned. (default 1m0s) | |
| --wait duration Wait for the unjoin command execution to succeed (default to 60s). Execution failures will return timeout. |
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| --add-dir-header If true, adds the file directory to the header of the log messages |
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help help for version |
There was a problem hiding this comment.
| -h, --help help for version | |
| -h, --help Help for version |
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| --add-dir-header If true, adds the file directory to the header of the log messages |
|
I'm not sure if it really helps. @lonelyCZ What's your opinion here? Should we postpone this until the command line tools are stable? |
Yes, now the |
@Tingtal thx a lot, All the documents are automatically generated by the code, and I will address the modification suggestions you put forward in the code |
@lonelyCZ thx, All documentation is easily generated automatically by code, which is recommended if introduced in the future |
|
Hi @Fish-pro, in 1.3 version, we have moved docs to our website and I think it's time to move this pr on. Would you like to keep this going? |
What type of PR is this?
/kind feature
What this PR does / why we need it:
When using Karmadactl, the user lacks the command execution document, now add the ability to automatically generate guidance documents from the code, just need to execute
make ctldocsgen, can generate the help document in the code indocs/usergide/commandsWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: