Skip to content

Commit

Permalink
cmd/config: provide better help for configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
  • Loading branch information
rolinh committed Oct 22, 2020
1 parent 2d354db commit ea10949
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,24 @@ func New(vp *viper.Viper) *cobra.Command {
configCmd := &cobra.Command{
Use: "config",
Short: "Modify or view hubble config",
Long: "Modify or view hubble config",
Long: `Config allows to modify or view the hubble configuration. Global hubble options
can be set via flags, environment variables or a configuration file. The
following precedence order is used:
1. Flag
2. Environment variable
3. Configuration file
4. Default value
The "config view" subcommand provides a merged view of the configuration. The
"config set" and "config reset" subcommand modify values in the configuration
file.
Environment variable names start with HUBBLE_ followed by the flag name
capitalized where eventual dashes ('-') are replaced by underscores ('_').
For example, the environment variable that corresponds to the "--server" flag
is HUBBLE_SERVER. The environment variable for "--tls-allow-insecure" is
HUBBLE_TLS_ALLOW_INSECURE and so on.`,
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
// override root persistent pre-run to avoid flag/config checks
// as we want to be able to modify/view the config even if it is
Expand Down

0 comments on commit ea10949

Please sign in to comment.