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

⚠ Add GetOptions as optional argument of client.Reader and all its implementation #1917

Merged
merged 1 commit into from Jun 2, 2022

Conversation

FillZpp
Copy link
Contributor

@FillZpp FillZpp commented May 30, 2022

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 of metav1.GetOptions like resourceVersion="0" when they are directly getting from apiserver.

fixes #1915

…ementation

Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 30, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 30, 2022
@FillZpp
Copy link
Contributor Author

FillZpp commented May 30, 2022

/cc @alvaroaleman @joelanford

@@ -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
Copy link
Member

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

Copy link
Contributor Author

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?

@FillZpp
Copy link
Contributor Author

FillZpp commented May 31, 2022

/retitle ⚠ Add GetOptions as optional argument of client.Reader and all its implementation

@k8s-ci-robot k8s-ci-robot changed the title ✨ Add GetOptions as optional argument of client.Reader and all its implementation ⚠ Add GetOptions as optional argument of client.Reader and all its implementation May 31, 2022
Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@alvaroaleman
Copy link
Member

/lgtm

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

[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 /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 Jun 2, 2022
@k8s-ci-robot k8s-ci-robot merged commit f469197 into kubernetes-sigs:master Jun 2, 2022
@k8s-ci-robot k8s-ci-robot added this to the v0.10.x milestone Jun 2, 2022
@FillZpp
Copy link
Contributor Author

FillZpp commented Jun 6, 2022

/cherrypick release-0.12

@k8s-infra-cherrypick-robot

@FillZpp: new pull request created: #1925

In response to this:

/cherrypick release-0.12

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.

antgamdia added a commit to vmware-tanzu/kubeapps that referenced this pull request Sep 6, 2022
antgamdia added a commit to vmware-tanzu/kubeapps that referenced this pull request Sep 7, 2022
* 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>
mresvanis added a commit to mresvanis/he-sample-operator that referenced this pull request Sep 9, 2022
Breaking change:
- kubernetes-sigs/controller-runtime#1917

Signed-off-by: Michail Resvanis <mresvani@redhat.com>
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GetOption in client get call
4 participants