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

Improve flag handling and help output for subcommands - an example might be best #191

Open
VestigeJ opened this issue Jan 16, 2025 · 0 comments
Labels
enhancement New feature or request priority/1

Comments

@VestigeJ
Copy link

~> k3kcli -v
k3kcli version dev (HEAD)

~> k3kcli cluster create --servers 1 kicker --token YOUR_TOKEN_HERE
FATA[0000] empty cluster token

~> k3kcli cluster create --servers 1 kicker --token 'YOUR_TOKEN_HERE'
FATA[0000] empty cluster token

~> k3kcli cluster create --servers 1 kicker --token=YOUR_TOKEN_HERE
FATA[0000] empty cluster token

~> k3kcli cluster create --servers 1 kicker --token --help
FATA[0000] empty cluster token

~> k3kcli cluster create --servers 1 kicker --token moop
FATA[0000] empty cluster token

~> k3kcli cluster create --name kicker --token moop --servers 1

INFO[0000] Creating a new cluster [kicker]
FATA[0000] no matches for kind "Cluster" in version "k3k.io/v1alpha1" //offer to install controller here or install it automatically after checking if it's already in the cluster

~> k3kcli cluster create --help

NAME:
   k3kcli cluster create - Create new cluster

USAGE:
   k3kcli cluster create [command options] [arguments...]

OPTIONS:
   --kubeconfig value          Kubeconfig path [$KUBECONFIG]
   --name value                name of the cluster
   --servers value             number of servers (default: 1)
   --agents value              number of agents (default: 0)
   --token value               token of the cluster
   --cluster-cidr value        cluster CIDR
   --service-cidr value        service CIDR
   --persistence-type value    Persistence mode for the nodes (ephermal, static, dynamic) (default: "ephermal")
   --storage-class-name value  Storage class name for dynamic persistence type
   --server-args value         servers extra arguments
   --agent-args value          agents extra arguments
   --version value             k3s version (default: "v1.26.1-k3s1")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/1
Projects
None yet
Development

No branches or pull requests

2 participants