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
⚠ Add GetOptions as optional argument of client.Reader and all its implementation #1917
⚠ Add GetOptions as optional argument of client.Reader and all its implementation #1917
Conversation
…ementation Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
@@ -50,7 +50,7 @@ type Reader interface { | |||
// Get retrieves an obj for the given object key from the Kubernetes Cluster. | |||
// obj must be a struct pointer so that obj can be updated with the response | |||
// returned by the Server. | |||
Get(ctx context.Context, key ObjectKey, obj Object) error | |||
Get(ctx context.Context, key ObjectKey, obj Object, opts ...GetOption) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the change looks good to me, but it needs to be marked as breaking since we change the interface here. It is very likely that ppl have fake implementations of the client that need changing to adhere to the new signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I have updated the title. Do you think it is necessary to add the breaking warning into code comments?
/retitle ⚠ Add GetOptions as optional argument of client.Reader and all its implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, FillZpp 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 |
/cherrypick release-0.12 |
@FillZpp: new pull request created: #1925 In response to this:
Instructions 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/test-infra repository. |
See kubernetes-sigs/controller-runtime#1917 Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Bump sigs.k8s.io/controller-runtime from 0.12.3 to 0.13.0 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.12.3 to 0.13.0. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.12.3...v0.13.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Adapt fn signature to the new controller-runtime version See kubernetes-sigs/controller-runtime#1917 Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antonio Gamez Diaz <agamez@vmware.com>
Breaking change: - kubernetes-sigs/controller-runtime#1917 Signed-off-by: Michail Resvanis <mresvani@redhat.com>
Updated k8s libs to v1.25, then ran: go mod tidy Updated tests to align with controller runtime 0.13 client interface. xref: kubernetes-sigs/controller-runtime#1917 Also bump go version to 1.18
Updated k8s libs to v1.25, then ran: go mod tidy Updated tests to align with controller runtime 0.13 client interface. xref: kubernetes-sigs/controller-runtime#1917
Signed-off-by: FillZpp FillZpp.pub@gmail.com
Add
GetOptions
as optional argument of client.Reader and all its implementation, so that ppl can set fields ofmetav1.GetOptions
likeresourceVersion="0"
when they are directly getting from apiserver.fixes #1915