Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inability to reference same-named Kinds #22

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

jaypipes
Copy link
Member

@jaypipes jaypipes commented Sep 3, 2024

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 #21

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 <jaypipes@gmail.com>
@jaypipes jaypipes merged commit 86f2cee into gdt-dev:main Sep 3, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant