kubernetes-sigs / kubernetes-sigs/mcs-api
Support alternate GVR in ServiceExport and ServiceImport in e2e tests
- Dominant language
- Go
- Stars
- 261
- Forks
- 49
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 3
Description
Vendors today may be using a mirror of the ServiceExport and ServiceImport APIs and today's e2e tests make it impossible for them to run them as conformance tests because the mcsclient is [ultimately configured](https://github.com/kubernetes-sigs/mcs-api/blob/master/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go#L75) to use the v1alpha1 API whose [GVR (group version resource) is hardcoded as` multicluster.x-k8s.io/v1alpha`](https://github.com/kubernetes-sigs/mcs-api/blob/master/pkg/apis/v1alpha1/zz_generated.register.go).
As discussed in SIG-MC today 11/15/2022 we'd like to accommodate vendors who may, due to their own API deprecation policy or during active dev, use a mirror of MCS until upstream is GA (GKE being one of these).
Two ways to potentially address this:
1. tests use a common struct and convert
2. parameterize the GVR
Ultimately the schema of the resources should still be the same for conformance.
Here's an example against GKE clusters of the e2e tests failing on this point:
```
Unexpected error:
<*errors.StatusError | 0xc000134640>: {
ErrStatus: {
TypeMeta: {Kind: "", APIVersion: ""},
ListMeta: {
SelfLink: "",
ResourceVersion: "",
Continue: "",
RemainingItemCount: nil,
},
Status: "Failure",
Message: "the server could not find the requested resource (post serviceimports.multicluster.x-k8s.io)",
Reason: "NotFound",
Details: {
Name: "",
Group: "multicluster.x-k8s.io",
Kind: "serviceimports",
UID: "",
Causes: [
{
Type: "UnexpectedServerResponse",
Message: "404 page not found",
Field: "",
},
],
RetryAfterSeconds: 0,
},
Code: 404,
},
}
the server could not find the requested resource (post serviceimports.multicluster.x-k8s.io)
occurred
------------------------------
```
Contributor guide
Assessment
This issue has not been assessed yet.