1
0
mirror of synced 2026-02-13 13:06:56 +00:00

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:
Michael Bridgen
2020-12-11 12:40:50 +00:00
parent 75023011d3
commit 4abe69f90a
8 changed files with 22 additions and 12 deletions

View File

@@ -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,