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

@ -206,7 +206,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
if isInstall {
// apply install manifests
logger.Actionf("installing components in %s namespace", namespace)
if err := applyInstallManifests(ctx, manifest, bootstrapComponents); err != nil {
if err := applyInstallManifests(ctx, manifest, bootstrapComponents()); err != nil {
return err
}
logger.Successf("install completed")