Describe the bug
While attempting to test #693 on master I was not getting any results for the CRD list. I fixed the results by changing the version handling in the original PR #718 however that deferred the problem to the drawer that appeared empty. Upon further investigation there are additional API changes related to the use of the v1 custom resource API vs the v1beta as was previously used.
I updated the PR to correctly handle the remaining API changes and for my newer clusters running kubernetes 1.17+ the custom resources appear fine.
I have a couple older clusters running kubernetes 1.15 that no longer show any custom resources in master vs 3.5.3.
This issue is to highlight the backwards compatibility angle and either require newer clusters for this aspect or we work out what version of the cluster is and switch API to beta depending on cluster version.
Note PR #718 works with the beta API if I manually switch the relevant crdApi to crdBetaApi across the board.
We could probably use /apis endpoint for resolving a preferred API version:
$ kubectl get --raw /apis
...
"name": "apiextensions.k8s.io",
"versions": [
{
"groupVersion": "apiextensions.k8s.io/v1",
"version": "v1"
},
{
"groupVersion": "apiextensions.k8s.io/v1beta1",
"version": "v1beta1"
}
],
"preferredVersion": {
"groupVersion": "apiextensions.k8s.io/v1",
"version": "v1"
}
},
@jakolehm your suggestion was great here - I have implemented that in #718
I'm running 3.6.0-beta.1 against a 1.17.9 k8s cluster and the individual CRD listings are all empty / 404ing.
The Definitions listing does work however.
URL: http://e93de209-6be3-4bfd-b9fb-08e0fe1137b8.localhost:57451/api-kube/apis/apiextensions.k8s.io/v1/customresourcedefinitions?
Status Code: 200 OK
Request URL: http://e93de209-6be3-4bfd-b9fb-08e0fe1137b8.localhost:57451/api-kube/apis/monitoring.coreos.com/undefined/servicemonitors?
Status Code: 404 Not Found
Request URL: http://e93de209-6be3-4bfd-b9fb-08e0fe1137b8.localhost:57451/api-kube/apis/monitoring.coreos.com/undefined/prometheuses?
Status Code: 404 Not Found
Request URL: http://e93de209-6be3-4bfd-b9fb-08e0fe1137b8.localhost:57451/api-kube/apis/monitoring.coreos.com/undefined/prometheusrules?
Status Code: 404 Not Found
I should also note that I see the exact same behavior in 3.6.0 against a 1.16.13 k8s cluster ...
Reporting this here, mostly as FYI, hoping the #718 patch fixes it in beta3 馃槃
@arohter yes I strongly suspect this is the same issue.