Skip to content

Commit 6a6361b

Browse files
Remove the clusteruid lookup which was causing the agent to hang
Signed-off-by: Richard Wall <[email protected]>
1 parent b2adf35 commit 6a6361b

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

pkg/agent/run.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232

3333
"github.com/jetstack/preflight/api"
3434
"github.com/jetstack/preflight/pkg/client"
35-
"github.com/jetstack/preflight/pkg/clusteruid"
3635
"github.com/jetstack/preflight/pkg/datagatherer"
3736
"github.com/jetstack/preflight/pkg/datagatherer/k8s"
3837
"github.com/jetstack/preflight/pkg/kubeconfig"
@@ -79,28 +78,6 @@ func Run(cmd *cobra.Command, args []string) (returnErr error) {
7978
return fmt.Errorf("While evaluating configuration: %v", err)
8079
}
8180

82-
// We need the cluster UID before we progress further so it can be sent along with other data readings
83-
84-
{
85-
restCfg, err := kubeconfig.LoadRESTConfig("")
86-
if err != nil {
87-
return err
88-
}
89-
90-
clientset, err := kubernetes.NewForConfig(restCfg)
91-
if err != nil {
92-
return err
93-
}
94-
95-
ctx, err = clusteruid.GetClusterUID(ctx, clientset)
96-
if err != nil {
97-
return fmt.Errorf("failed to get cluster UID: %v", err)
98-
}
99-
100-
clusterUID := clusteruid.ClusterUIDFromContext(ctx)
101-
log.V(logs.Debug).Info("Retrieved cluster UID", "clusterUID", clusterUID)
102-
}
103-
10481
group, gctx := errgroup.WithContext(ctx)
10582
defer func() {
10683
cancel()

0 commit comments

Comments
 (0)