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

✨ support custom negotiated serializer 🐛 #382

Merged

Conversation

terinjokes
Copy link
Contributor

The Kubernetes client allows for users to configure a serializer which
is used to encode and decode resources exchanged with the Kubernetes API
server.

This changeset modifies the controller-runtime client to only set the
default serializer if the NegotiatedSerializer option is nil.

Signed-off-by: Terin Stock terin@cloudflare.com

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 3, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 3, 2019
@terinjokes
Copy link
Contributor Author

I assume, since I cut from broken master, the CI test are failing for the same reason here.

@DirectXMan12
Copy link
Contributor

It's a flake. I think we may need to bump the version of the kubernetes binaries used in our tests.

@DirectXMan12
Copy link
Contributor

DirectXMan12 commented Apr 5, 2019

Seems fairly reasonable, but the godocs need an update to mention this. Otherwise LGTM.
Out of curiosity, what's the usecase here? Something like proto support?

@terinjokes
Copy link
Contributor Author

terinjokes commented Apr 6, 2019

@DirectXMan12 I'm happy to update the GoDocs. In which package did you have in mind?

I call scheme.AddTypeDefaultingFunc which I noticed wasn't being run after converting my project to using controller-runtime.

@DirectXMan12
Copy link
Contributor

The GoDocs on RESTClientForGVK should mention this.

@DirectXMan12
Copy link
Contributor

which I noticed wasn't being run after converting my project to using controller-runtime.

ah, ok.

The Kubernetes client allows for users to configure a serializer which
is used to encode and decode resources exchanged with the Kubernetes API
server.

This changeset modifies the controller-runtime client to only set the
default serializer if the NegotiatedSerializer option is nil.

Signed-off-by: Terin Stock <terin@cloudflare.com>
@terinjokes
Copy link
Contributor Author

@DirectXMan12 I added a note, I'm happy to make changes if you have a better way to word it.

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 8, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, terinjokes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2019
@DirectXMan12 DirectXMan12 changed the title fix(client): support custom negotiated serializer 🐛 ✨ support custom negotiated serializer 🐛 Apr 8, 2019
@k8s-ci-robot k8s-ci-robot merged commit 742c722 into kubernetes-sigs:master Apr 8, 2019
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
version 1.0.0 is no longer usable

Related: #382
@terinjokes terinjokes deleted the patches/client-serializer branch November 14, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants