Skip to content

Commit 1283979

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

File tree

4 files changed

+0
-109
lines changed

4 files changed

+0
-109
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.

pkg/internal/cyberark/dataupload/dataupload.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ func (c *CyberArkClient) PostDataReadingsWithOptions(ctx context.Context, readin
176176
if err != nil {
177177
return fmt.Errorf("while converting datareadings to Cyberark snapshot format: %s", err)
178178
}
179-
// TODO(wallrj): Use the k8s-discovery gatherer to get clusterID
180-
snapshot.ClusterID = opts.ClusterName
181179

182180
encodedBody := &bytes.Buffer{}
183181
checksum := sha256.New()

0 commit comments

Comments
 (0)