Skip to content
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

Reconstruct the global flags content of kurator cli. #526

Open
Xieql opened this issue Dec 22, 2023 · 0 comments
Open

Reconstruct the global flags content of kurator cli. #526

Xieql opened this issue Dec 22, 2023 · 0 comments

Comments

@Xieql
Copy link
Contributor

Xieql commented Dec 22, 2023

What would you like to be added:
These flags should be placed under the corresponding sub-commands, otherwise it is user-unfriendly.

Why is this needed:
When we enter kurator -h, we will see:

Kurator builds distributed cloud-native stacks.

Usage:
kurator [command]

Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
install Install a target component
join Register a cluster or node
pipeline Print the info of kurator pipeline
tool Tool information for the component
version Print the version of kurator

Flags:
--context string name of the kubeconfig context to use
--dry-run console/log output only, make no changes.
-h, --help help for kurator
--home-dir string install path, default to $HOME/.kurator (default "/root/.kurator")
-c, --kubeconfig string path to the kubeconfig file, default to karmada apiserver config (default "/etc/karmada/karmada-apiserver.config")
--wait-interval duration interval used for checking pod ready, default value is 1s. (default 1s)
--wait-timeout duration timeout used for checking pod ready, default value is 2m. (default 2m0s)

When we enter kurator tool -h, we will see:

kurator tool -h
Tool information for the component

Usage:
  kurator tool [command]

Available Commands:
  list        list tool information

Flags:
  -h, --help   help for tool

Global Flags:
      --context string           name of the kubeconfig context to use
      --dry-run                  console/log output only, make no changes.
      --home-dir string          install path, default to $HOME/.kurator (default "/root/.kurator")
  -c, --kubeconfig string        path to the kubeconfig file, default to karmada apiserver config (default "/etc/karmada/karmada-apiserver.config")
      --wait-interval duration   interval used for checking pod ready, default value is 1s. (default 1s)
      --wait-timeout duration    timeout used for checking pod ready, default value is 2m. (default 2m0s)

In fact, the above global flags are only effective for specific sub-commands. For example, --wait-interval is only used in the kurator plugin sub-command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant