Skip to content

Commit 4a74c38

Browse files
committed
Remove obsolete clusteruid package
Signed-off-by: Richard Wall <[email protected]>
1 parent 4c32273 commit 4a74c38

File tree

3 files changed

+0
-107
lines changed

3 files changed

+0
-107
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/internal/cyberark/dataupload"
@@ -120,28 +119,6 @@ func Run(cmd *cobra.Command, args []string) (returnErr error) {
120119
}
121120
}
122121

123-
// We need the cluster UID before we progress further so it can be sent along with other data readings
124-
// TODO(wallrj): Use the k8s-discovery gatherer to get clusterID
125-
{
126-
restCfg, err := kubeconfig.LoadRESTConfig("")
127-
if err != nil {
128-
return err
129-
}
130-
131-
clientset, err := kubernetes.NewForConfig(restCfg)
132-
if err != nil {
133-
return err
134-
}
135-
136-
ctx, err = clusteruid.GetClusterUID(ctx, clientset)
137-
if err != nil {
138-
return fmt.Errorf("failed to get cluster UID: %v", err)
139-
}
140-
141-
clusterUID := clusteruid.ClusterUIDFromContext(ctx)
142-
log.V(logs.Debug).Info("Retrieved cluster UID", "clusterUID", clusterUID)
143-
}
144-
145122
group, gctx := errgroup.WithContext(ctx)
146123
defer func() {
147124
cancel()

pkg/clusteruid/clusteruid.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

pkg/clusteruid/clusteruid_test.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)