Skip to content

Commit

Permalink
automatically deploy embedded cluster apps with provided config values
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Oct 28, 2024
1 parent 35c549e commit c83a64a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/airgap/airgap.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func CreateAppFromAirgap(opts CreateAirgapAppOpts) (finalError error) {
return errors.Wrap(err, "failed to get downstream version status")
}

if status == storetypes.VersionPendingClusterManagement {
if status == storetypes.VersionPendingClusterManagement && configFile == "" {
// if pending cluster management, we don't want to deploy the app
return nil
}
Expand Down
1 change: 1 addition & 0 deletions pkg/kotsadmconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,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)

Expand Down
2 changes: 1 addition & 1 deletion pkg/online/online.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func CreateAppFromOnline(opts CreateOnlineAppOpts) (_ *kotsutil.KotsKinds, final
return nil, errors.Wrap(err, "failed to get downstream version status")
}

if status == storetypes.VersionPendingClusterManagement {
if status == storetypes.VersionPendingClusterManagement && configFile == "" {
// if pending cluster management, we don't want to deploy the app
return kotsKinds, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func HomeDir() string {
}

func IsEmbeddedCluster() bool {
return os.Getenv("EMBEDDED_CLUSTER_ID") != ""
return EmbeddedClusterID() != ""
}

func EmbeddedClusterID() string {
Expand Down

0 comments on commit c83a64a

Please sign in to comment.