diff --git a/pkg/airgap/airgap.go b/pkg/airgap/airgap.go index 5600e0c9e5..7de2044ba4 100644 --- a/pkg/airgap/airgap.go +++ b/pkg/airgap/airgap.go @@ -281,8 +281,14 @@ func CreateAppFromAirgap(opts CreateAirgapAppOpts) (finalError error) { } if status == storetypes.VersionPendingClusterManagement { - // if pending cluster management, we don't want to deploy the app - return nil + if configFile != "" { + // if there is a config file, then we should proceed with the installation normally, not wait for the user + // to click through the UI to add nodes and configure the app + status = storetypes.VersionPendingConfig + } else { + // if pending cluster management, we don't want to deploy the app + return nil + } } hasStrictPreflights, err := store.GetStore().HasStrictPreflights(a.ID, newSequence) diff --git a/pkg/kotsadmconfig/config.go b/pkg/kotsadmconfig/config.go index 3b335ffa38..100534ae3a 100644 --- a/pkg/kotsadmconfig/config.go +++ b/pkg/kotsadmconfig/config.go @@ -48,6 +48,7 @@ func IsUnsetItem(item kotsv1beta1.ConfigItem) bool { return true } +// NeedsConfiguration returns true if the app has required config values that are not set func NeedsConfiguration(appSlug string, sequence int64, isAirgap bool, kotsKinds *kotsutil.KotsKinds, registrySettings registrytypes.RegistrySettings) (bool, error) { log := logger.NewCLILogger(os.Stdout) @@ -166,6 +167,7 @@ func UpdateAppConfigValues(values map[string]kotsv1beta1.ConfigValue, configGrou return values } +// this is where config values that are passed to the install command are read from func ReadConfigValuesFromInClusterSecret() (string, error) { log := logger.NewCLILogger(os.Stdout) diff --git a/pkg/online/online.go b/pkg/online/online.go index 0b707bcb27..7767874e45 100644 --- a/pkg/online/online.go +++ b/pkg/online/online.go @@ -220,8 +220,14 @@ func CreateAppFromOnline(opts CreateOnlineAppOpts) (_ *kotsutil.KotsKinds, final } if status == storetypes.VersionPendingClusterManagement { - // if pending cluster management, we don't want to deploy the app - return kotsKinds, nil + if configFile != "" { + // if there is a config file, then we should proceed with the installation normally, not wait for the user + // to click through the UI to add nodes and configure the app + status = storetypes.VersionPendingConfig + } else { + // if pending cluster management, we don't want to deploy the app + return kotsKinds, nil + } } hasStrictPreflights, err := store.GetStore().HasStrictPreflights(opts.PendingApp.ID, newSequence) diff --git a/pkg/util/util.go b/pkg/util/util.go index abe7e2bcb8..9924d4186a 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -161,7 +161,7 @@ func HomeDir() string { } func IsEmbeddedCluster() bool { - return os.Getenv("EMBEDDED_CLUSTER_ID") != "" + return EmbeddedClusterID() != "" } func EmbeddedClusterID() string {