Skip to content

Commit

Permalink
installer: clarify experimental config flag
Browse files Browse the repository at this point in the history
Fixes #8107

This PR updates the flag descriptions, and the `render` display
notes to be more explicit on what experimental config is.

This flag is required, to make sure users are opting in explicitely/
knowlingly to use the experimental config.

Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati committed Mar 2, 2022
1 parent ba168ed commit 63458b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install/installer/cmd/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ A config file is required which can be generated with the init command.`,

if cfg.Experimental != nil {
if renderOpts.UseExperimentalConfig {
fmt.Fprintf(os.Stderr, "rendering using experimental config - here be dragons\n")
fmt.Fprintf(os.Stderr, "rendering using experimental config\n")
} else {
fmt.Fprintf(os.Stderr, "config contains experimental options - ignoring them\n")
fmt.Fprintf(os.Stderr, "ignoring experimental config. Use `--use-experimental-config` to include the experimental section in config\n")
cfg.Experimental = nil
}
}
Expand Down Expand Up @@ -190,5 +190,5 @@ func init() {
renderCmd.PersistentFlags().StringVarP(&renderOpts.ConfigFN, "config", "c", os.Getenv("GITPOD_INSTALLER_CONFIG"), "path to the config file")
renderCmd.PersistentFlags().StringVarP(&renderOpts.Namespace, "namespace", "n", "default", "namespace to deploy to")
renderCmd.Flags().BoolVar(&renderOpts.ValidateConfigDisabled, "no-validation", false, "if set, the config will not be validated before running")
renderCmd.Flags().BoolVar(&renderOpts.UseExperimentalConfig, "danger-use-unsupported-config", false, "enable use of unsupported config")
renderCmd.Flags().BoolVar(&renderOpts.UseExperimentalConfig, "use-experimental-config", false, "enable the use of experimental config that is prone to be changed")
}

0 comments on commit 63458b8

Please sign in to comment.