Give flux bootstrap the extra components flag
This commit adds a flag for supplying extra components to bootstrap (and its subcommands), to match the one for `flux install`. Since the bootstrapComponents global is used in a few places, I made it a func and renamed the variable. For consistency, I also renamed the var used in install.go. Lastly, so that the flag sorts next to `--components`, I changed it to `--components-extra` in both commands. Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
@@ -56,7 +56,7 @@ var (
|
||||
installDryRun bool
|
||||
installManifestsPath string
|
||||
installVersion string
|
||||
installComponents []string
|
||||
installDefaultComponents []string
|
||||
installExtraComponents []string
|
||||
installRegistry string
|
||||
installImagePullSecret string
|
||||
@@ -73,9 +73,9 @@ func init() {
|
||||
"only print the object that would be applied")
|
||||
installCmd.Flags().StringVarP(&installVersion, "version", "v", defaults.Version,
|
||||
"toolkit version")
|
||||
installCmd.Flags().StringSliceVar(&installComponents, "components", defaults.Components,
|
||||
installCmd.Flags().StringSliceVar(&installDefaultComponents, "components", defaults.Components,
|
||||
"list of components, accepts comma-separated values")
|
||||
installCmd.Flags().StringSliceVar(&installExtraComponents, "extra-components", nil,
|
||||
installCmd.Flags().StringSliceVar(&installExtraComponents, "components-extra", nil,
|
||||
"list of components in addition to those supplied or defaulted, accepts comma-separated values")
|
||||
installCmd.Flags().StringVar(&installManifestsPath, "manifests", "", "path to the manifest directory")
|
||||
installCmd.Flags().MarkHidden("manifests")
|
||||
@@ -106,7 +106,7 @@ func installCmdRun(cmd *cobra.Command, args []string) error {
|
||||
logger.Generatef("generating manifests")
|
||||
}
|
||||
|
||||
components := append(installComponents, installExtraComponents...)
|
||||
components := append(installDefaultComponents, installExtraComponents...)
|
||||
|
||||
opts := install.Options{
|
||||
BaseURL: installManifestsPath,
|
||||
|
||||
Reference in New Issue
Block a user