You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in gdt-kube that uses the k8s client discovery cache to look up resource kinds does not work properly when there are multiple Kinds with the same name each with a different APIVersion.
For instance, if there is a kubevirt.io/VirtualMachine and a networkcloud.VirtualMachine, attempting to create an object where the manifest specifies networkcloud/VirtualMachine will result in something like this:
assertion failed: unexpected error: the API version in the data (networkcloud/v1) does not match the expected API version (kubevirt.io/v1)
The text was updated successfully, but these errors were encountered:
There were a couple problems that were the root cause of this issue.
First, I was only handling the difference between namespaced and
non-namespaced CRDs in the GET action. For CREATE, DELETE, and APPLY, I
was not properly differentiating between cluster-scoped and
namespace-scoped CRDs.
After fixing that, there was a problem with how the `gvrFromGVK` method
on the connection struct was discovering an APIResource from the
GroupVersionKind. I was only passing in the Kind instead of the
GroupVersion information as well, which resulted in the discovery cache
in the kube client failing to match the correct CRD when there were two
different CRDs with the same Kind but different GroupVersions.
Closes Issue gdt-dev#21
Signed-off-by: Jay Pipes <[email protected]>
The code in gdt-kube that uses the k8s client discovery cache to look up resource kinds does not work properly when there are multiple Kinds with the same name each with a different APIVersion.
For instance, if there is a
kubevirt.io/VirtualMachine
and anetworkcloud.VirtualMachine
, attempting to create an object where the manifest specifiesnetworkcloud/VirtualMachine
will result in something like this:The text was updated successfully, but these errors were encountered: