Skip to content

Commit 7728d99

Browse files
Arta AsadiArta Asadi
authored andcommitted
fix: add kubernetes cluster describer
1 parent 1fe0ea8 commit 7728d99

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

discovery/describers/kubernetes_cluster.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,17 @@ func DoDiscovery(kubeConfig string) (*model.KubernetesClusterDescription, error)
332332
// Create the full path for the kubeconfig file
333333
kubeconfigPath := filepath.Join(tmpDir, "kubeconfig.yaml")
334334

335+
fmt.Println("kubeConfig", kubeConfig)
336+
335337
// Write the string into the file with 0600 permissions
336338
err := os.WriteFile(kubeconfigPath, []byte(kubeConfig), 0600)
337339
if err != nil {
338340
return nil, err
339341
}
340342

343+
fmt.Println("kubeconfigPath", kubeconfigPath)
344+
time.Sleep(2 * time.Second)
345+
341346
// --- Basic File Existence Check ---
342347
if _, err := os.Stat(kubeconfigPath); os.IsNotExist(err) {
343348
return nil, err

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ require (
1717
go.uber.org/zap v1.27.0
1818
golang.org/x/net v0.36.0
1919
golang.org/x/oauth2 v0.23.0
20+
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
2021
google.golang.org/grpc v1.67.1
2122
google.golang.org/protobuf v1.35.2
2223
k8s.io/api v0.32.0

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
14071407
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14081408
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
14091409
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
1410+
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
14101411
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
14111412
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
14121413
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=

0 commit comments

Comments
 (0)