What steps did you take and what happened:
I was trying to write a plugin that supports a custom resource list view. When listing objects, how can I get current user selected namespace?
router.HandleFunc("*", func(request service.Request) (component.ContentResponse, error) {
podList, err := request.DashboardClient().List(request.Context(), store.Key{
Namespace: "default", // TODO: how to get current namespace?
APIVersion: "v1",
Kind: "Pod",
})
if err != nil {
return *contentResponse, err
}
...
})
Environment:
Octant version (use octant version): 0.25.1
Kubernetes version (use kubectl version): 1.23.5
OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): Fedora 35
What steps did you take and what happened: I was trying to write a plugin that supports a custom resource list view. When listing objects, how can I get current user selected namespace?
Environment:
octant version
): 0.25.1kubectl version
): 1.23.5