diff --git a/pkg/handlers/app.go b/pkg/handlers/app.go index a89ed4faf5..ac75424826 100644 --- a/pkg/handlers/app.go +++ b/pkg/handlers/app.go @@ -17,7 +17,6 @@ import ( "github.com/replicatedhq/kots/pkg/embeddedcluster" "github.com/replicatedhq/kots/pkg/gitops" "github.com/replicatedhq/kots/pkg/helm" - "github.com/replicatedhq/kots/pkg/k8sutil" "github.com/replicatedhq/kots/pkg/kotsutil" "github.com/replicatedhq/kots/pkg/logger" "github.com/replicatedhq/kots/pkg/operator" @@ -324,17 +323,7 @@ func responseAppFromApp(a *apptypes.App) (*types.ResponseApp, error) { Slug: d.ClusterSlug, } - clientset, err := k8sutil.GetClientset() - if err != nil { - return nil, errors.Wrap(err, "failed to get clientset") - } - - isEmbeddedCluster, err := embeddedcluster.IsEmbeddedCluster(clientset) - if err != nil { - return nil, errors.Wrap(err, "failed to check if cluster is embedded") - } - - if isEmbeddedCluster { + if util.IsEmbeddedCluster() { embeddedClusterConfig, err := store.GetStore().GetEmbeddedClusterConfigForVersion(a.ID, a.CurrentSequence) if err != nil { return nil, errors.Wrap(err, "failed to get embedded cluster config")