criticalstack / crit

A tool for bootstrapping Kubernetes
https://docs.crit.sh
Apache License 2.0
68 stars 10 forks source link

"crit create token" returns no output #15

Open seaunderwater opened 4 years ago

seaunderwater commented 4 years ago

When creating a bootstrap token using crit create token, no output is returned to the user:

$ crit create token
$

This is inconvenient for the following reasons:

$ kg secret bootstrap-token-8459vn -o yaml 
apiVersion: v1
data:
  auth-extra-groups: c3lzdGVtOmJvb3RzdHJhcHBlcnM6Y3JpdDpkZWZhdWx0LW5vZGUtdG9rZW4=
  expiration: MjAzMC0xMC0wNVQxOTozODo1M1o=
  token-id: ODQ1OXZu
  token-secret: eXE0azkzZHhkd3Zxaml2cQ==
  usage-bootstrap-authentication: dHJ1ZQ==
  usage-bootstrap-signing: dHJ1ZQ==
kind: Secret
...
ChrisRx commented 4 years ago

In addition to this, both crit create token and crit generate token specific cobra.MinimumNArgs(1). crit create token should instead specify cobra.MaximumNArgs(1) and crit generate token should specify cobra.NoArgs.