From ef18b3659a30ff13f48bdb98f19469b9cb777595 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Fri, 26 Jan 2024 10:32:34 -0500 Subject: [PATCH] update embedded cluster check in apps handler (#4401) --- pkg/handlers/app.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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")