Set GVK in an object while calling typed-client#2946
Set GVK in an object while calling typed-client#2946HiranmoyChowdhury wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
Signed-off-by: Hiranmoy Das Chowdhury <hiranmoy.das70@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: HiranmoyChowdhury The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @HiranmoyChowdhury. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/hold You have another PR that addresses this same issues with feedback from @alvaroaleman that is put on hold. I believe the intent of the issue was said to be by design. @sbueringer thoughts? |
|
Lets please keep this discussion in one place at the first PR, #2943 |
|
Closing, following #2943 |
Signed-off-by: Hiranmoy Das Chowdhury hiranmoy.das70@gmail.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
While getting or creating or patching or updating object using typed-client which is a dynamic client in controller-runtime repository, gvk/TypeMeta found empty for that object because of the codec convention.
As unstructured client and metadata client and typed client is not exported. So, we can't call these from outside and we are using only one client for these. So, when we try to get unstructured object, we get the GVK. But, for structured object we missed GVK with the same client(from users perspective), this is a little confusion for newcomers like me. I had to find this by a lot of debugging. Also, there is an option to determine what the GVK is: obj.GetObjectKind().GroupVersionKind(). As there is a option I assumed this is fixed and set and we don't need to worry about this. I guess this should be set as expected.
To create owner reference or many more we won't need to pass scheme or gvk externally.
Does this PR introduce a user-facing change?
NONE
Which issue(s) this PR fixes:
kubernetes/kubernetes#80609
kubernetes/kubernetes#3030