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

Typos in the output of deck --help #1017

Open
GigaPrimatus opened this issue Sep 5, 2023 · 3 comments
Open

Typos in the output of deck --help #1017

GigaPrimatus opened this issue Sep 5, 2023 · 3 comments

Comments

@GigaPrimatus
Copy link

I believe the text marked below should be replaced with 'string'.

$ deck --help
The deck tool helps you
manage Kong clusters with a declarative
configuration file.

It can be used to export, import, or sync entities to Kong.

Usage:
deck [command]

Available Commands:
completion Generate completion script
convert Convert files from one format into another format
diff Diff the current entities in Kong with the one on disks
dump Export Kong configuration to a file
file Subcommand to host the decK file manipulation operations
help Help about any command
konnect Configuration tool for Konnect (in alpha)
ping Verify connectivity with Kong
reset Reset deletes all entities in Kong
sync Sync performs operations to get Kong's configuration to match the state file
validate Validate the state file
version Print the decK version

Flags:
--analytics --analytics=false Share anonymized data to help improve decK.
Use --analytics=false to disable this. (default true)
--ca-cert --ca-cert-file Custom CA certificate (raw contents) to use to verify Kong's Admin TLS certificate.
This value can also be set using DECK_CA_CERT environment variable.
This takes precedence over --ca-cert-file flag.
--ca-cert-file string Path to a custom CA certificate to use to verify Kong's Admin TLS certificate.
This value can also be set using DECK_CA_CERT_FILE environment variable.
--config string Config file (default is $HOME/.deck.yaml).
--headers strings HTTP headers (key:value) to inject in all requests to Kong's Admin API.
This flag can be specified multiple times to inject multiple headers.
-h, --help help for deck
--kong-addr string HTTP address of Kong's Admin API.
This value can also be set using the environment variable DECK_KONG_ADDR
environment variable. (default "http://localhost:8001")
--kong-cookie-jar-path string Absolute path to a cookie-jar file in the Netscape cookie format for auth with Admin Server.
You may also need to pass in as header the User-Agent that was used to create the cookie-jar.
--konnect-addr string Address of the Konnect endpoint. (default "https://us.api.konghq.com")
--konnect-email string Email address associated with your Konnect account.
--konnect-password --konnect-password-file Password associated with your Konnect account, this takes precedence over --konnect-password-file flag.
--konnect-password-file string File containing the password to your Konnect account.
--konnect-runtime-group-name string Konnect Runtime group name.
--konnect-token --konnect-token-file Personal Access Token associated with your Konnect account, this takes precedence over --konnect-token-file flag.
--konnect-token-file string File containing the Personal Access Token to your Konnect account.
--no-color Disable colorized output
--skip-workspace-crud Skip API calls related to Workspaces (Kong Enterprise only).
--timeout int Set a request timeout for the client to connect with Kong (in seconds). (default 10)
--tls-client-cert string PEM-encoded TLS client certificate to use for authentication with Kong's Admin API.
This value can also be set using DECK_TLS_CLIENT_CERT environment variable. Must be used in conjunction with tls-client-key
--tls-client-cert-file string Path to the file containing TLS client certificate to use for authentication with Kong's Admin API.
This value can also be set using DECK_TLS_CLIENT_CERT_FILE environment variable. Must be used in conjunction with tls-client-key-file
--tls-client-key string PEM-encoded private key for the corresponding client certificate .
This value can also be set using DECK_TLS_CLIENT_KEY environment variable. Must be used in conjunction with tls-client-cert
--tls-client-key-file string Path to file containing the private key for the corresponding client certificate.
This value can also be set using DECK_TLS_CLIENT_KEY_FILE environment variable. Must be used in conjunction with tls-client-cert-file
--tls-server-name string Name to use to verify the hostname in Kong's Admin TLS certificate.
This value can also be set using DECK_TLS_SERVER_NAME environment variable.
--tls-skip-verify Disable verification of Kong's Admin TLS certificate.
This value can also be set using DECK_TLS_SKIP_VERIFY environment variable.
--verbose int Enable verbose logging levels
Sets the verbosity level of log output (higher is more verbose).

Use "deck [command] --help" for more information about a command.

@Tieske
Copy link
Member

Tieske commented Sep 6, 2023

can you be a bit more specific? I know the help output, but fail to see what is marked and what needs to be fixed? (might be due to GitHub markdown formatting)

@GigaPrimatus
Copy link
Author

GigaPrimatus commented Sep 6, 2023

The marked text as an image is attached.
decK Help

I believe that should be replaced with a text that describes the expected type for the flag, and not listing another flag, so something like this:

--ca-cert string
--konnect-password string
-- konnect-token string

@Tieske
Copy link
Member

Tieske commented Sep 22, 2023

They seem defined properly, but get rendered badly by Cobra it seems;

deck/cmd/root.go

Lines 87 to 102 in c2a928f

rootCmd.PersistentFlags().String("ca-cert", "",
"Custom CA certificate (raw contents) to use to "+
"verify Kong's Admin TLS certificate.\n"+
"This value can also be set using DECK_CA_CERT"+
" environment variable.\n"+
"This takes precedence over `--ca-cert-file` flag.")
viper.BindPFlag("ca-cert",
rootCmd.PersistentFlags().Lookup("ca-cert"))
rootCmd.PersistentFlags().String("ca-cert-file", "",
"Path to a custom CA certificate to use "+
"to verify Kong's Admin TLS certificate.\n"+
"This value can also be set using DECK_CA_CERT_FILE"+
" environment variable.")
viper.BindPFlag("ca-cert-file",
rootCmd.PersistentFlags().Lookup("ca-cert-file"))

Example of badly rendered output (--ca-cert):

      --analytics --analytics=false                Share anonymized data to help improve decK.
                                                   Use --analytics=false to disable this. (default true)
      --ca-cert --ca-cert-file                     Custom CA certificate (raw contents) to use to verify Kong's Admin TLS certificate.
                                                   This value can also be set using DECK_CA_CERT environment variable.
                                                   This takes precedence over --ca-cert-file flag.
      --ca-cert-file string                        Path to a custom CA certificate to use to verify Kong's Admin TLS certificate.
                                                   This value can also be set using DECK_CA_CERT_FILE environment variable.
      --config string                              Config file (default is $HOME/.deck.yaml).

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

No branches or pull requests

2 participants