Skip to content

Commit

Permalink
update embedded cluster check in apps handler (#4401)
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell authored Jan 26, 2024
1 parent 6d22994 commit ef18b36
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pkg/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit ef18b36

Please sign in to comment.