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

🐛 Enable labels list options in fake client #410

Merged

Conversation

ingvagabund
Copy link

This commit allows passing label matches to the fake client List()
function.

This is done in a way similar to the CachedReader. Both now share a
common call to objectutil.FilterWithLabels.

Signed-off-by: sebgl contact.sebgl@gmail.com

Backporting #311 into release-0.1 branch.

This commit allows passing label matches to the fake client List()
function.

This is done in a way similar to the CachedReader. Both now share a
common call to `objectutil.FilterWithLabels`.

Signed-off-by: sebgl <contact.sebgl@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 26, 2019
@ingvagabund
Copy link
Author

@sebgl @DirectXMan12 PTAL

@ingvagabund ingvagabund changed the title Enable labels list options in fake client [release-0.1] Enable labels list options in fake client Apr 26, 2019
To eliminate:
pkg/cache/internal/cache_reader.go:91::warning: cyclomatic complexity 12 of function (*CacheReader).List() is high (> 10) (gocyclo)
pkg/client/fake/client.go:92::warning: cyclomatic complexity 12 of function (*fakeClient).List() is high (> 10) (gocyclo)
cynepco3hahue pushed a commit to cynepco3hahue/machine-api-operator that referenced this pull request Apr 29, 2019
Make possible to call to object List with label selector.

We should revert it back to https://github.com/kubernetes-sigs/controller-runtime/tree/release-0.1
once kubernetes-sigs/controller-runtime#410 merged
cynepco3hahue pushed a commit to cynepco3hahue/machine-api-operator that referenced this pull request May 7, 2019
Make possible to call to object List with label selector.

We should revert it back to https://github.com/kubernetes-sigs/controller-runtime/tree/release-0.1
once kubernetes-sigs/controller-runtime#410 merged
@DirectXMan12 DirectXMan12 changed the title [release-0.1] Enable labels list options in fake client 🐛 Enable labels list options in fake client May 10, 2019
@DirectXMan12
Copy link
Contributor

added the appropriate prefix to the title

/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 May 10, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 May 10, 2019
@k8s-ci-robot k8s-ci-robot merged commit 40231bd into kubernetes-sigs:release-0.1 May 10, 2019
@ingvagabund ingvagabund deleted the release-0.1-backport-311 branch May 16, 2019 07:43
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
drop support for legacy (v0) projects
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.

None yet

4 participants