Skip to content

Commit

Permalink
return kubeconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
Atanas Todorov committed Dec 16, 2024
1 parent 60569d5 commit 51c62fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion starlark/ucp_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,18 @@ func UcpProviderFn(thread *starlark.Thread, _ *starlark.Builtin, args starlark.T
//}

wcs := make([]starlark.Value, 0)
fmt.Println("Available Workspaces:")
var kubeconfigs []starlark.Value
for _, ws := range workspaces.Items {
switchWorkspace := NewUseWorkspaceCommand(ws.Name, config, mgmtKubeConfigPath)
kubeConfigPath, err := switchWorkspace.Run(context.Background())
if err != nil {
return nil, err
}
wcs = append(wcs, starlark.String(kubeConfigPath))
kubeconfigs = append(kubeconfigs, starlark.String(kubeConfigPath))
}

ucpProviderDict["kubeconfigs"] = starlark.NewList(kubeconfigs)
//kubconfigs := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9"}
//// add node info to dictionary
//var nodeIps []starlark.Value
Expand Down

0 comments on commit 51c62fd

Please sign in to comment.