Closed rohanKanojia closed 1 week ago
We do have logic in place for /apis
(APIGroupList
, APIGroup
).
And also for /api/v1
-or any other version- (APIResourceList
, APIResource
).
See getApiGroups
and getApiResources
.
Can you please elaborate on the use-case of this or on why it's specifically needed.
/api/v1
returns a APIResourceList just like /apis/{group}/{version}
/api
endpoint is different as it allows clients to discover the API server. It's used by kubectl
and helm
CLI before making any request.
If we want to provide support for /api
endpoint in Kubernetes Mock Server https://github.com/fabric8io/kubernetes-client/issues/6062 . We need to at least provide model support for this resource.
Is your task related to a problem? Please describe
I bumped into this issue while writing tests for https://github.com/eclipse-jkube/jkube/issues/2663 where I use KubernetesMockServer via Helm CLI.
Kubernetes APIServer provides an endpoint to allow clients to discover the API at
/api
which is the root path of the legacy v1 API.I'm not able to see any support in KubernetesClient for achieving this. APIVersions object is also absent from Kubernetes Model
Describe the solution you'd like
/api
endpoint is added to KubernetesClient DSLDescribe alternatives you've considered
I'm using raw JSON string at the moment as a workaround that's a bit ugly.
Additional context
No response