cli/install: add skip-components flag
To skip component installation. This is useful if users want to do some
operations in the cluster before installing components.
@@ -27,7 +27,10 @@ import (
"github.com/kinvolk/lokomotive/pkg/lokomotive"
)
-var quiet bool
+var (
+ quiet bool
+ skipComponents bool
+)
var clusterInstallCmd = &cobra.Command{
Use: "install",
@@ -40,6 +43,7 @@ func init() {
pf := clusterInstallCmd.PersistentFlags()
pf.BoolVarP(&confirm, "confirm", "", false, "Upgrade cluster without asking for confirmation")
pf.BoolVarP(&quiet, "quiet", "q", false, "Suppress the output from Terraform")
+ pf.BoolVarP(&skipComponents, "skip-components", "", false, "Skip component installation")
}
func runClusterInstall(cmd *cobra.Command, args []string) {
@@ -74,6 +78,10 @@ func runClusterInstall(cmd *cobra.Command, args []string) {
ctxLogger.Fatalf("Verify cluster installation: %v", err)
}
+ if skipComponents {
+ return
+ }
+
var componentsToInstall []string
for _, component := range lokoConfig.RootConfig.Components {
componentsToInstall = append(componentsToInstall, component.Name)
