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

Feature support FakeClientset match subresource #100939

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

wzshiming
Copy link
Member

@wzshiming wzshiming commented Apr 9, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #100938
xref istio/istio#31923 (comment)

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Support FakeClientset match subresource 

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Apr 9, 2021
@k8s-ci-robot k8s-ci-robot requested review from liggitt and soltysh April 9, 2021 05:29
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Apr 9, 2021
@wzshiming
Copy link
Member Author

/sig testing

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Apr 9, 2021
@wzshiming wzshiming changed the title Feature support FakeClientset subresource match Feature support FakeClientset match subresource Apr 9, 2021
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 9, 2021
@fedebongio
Copy link
Contributor

/assign @jpbetz
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 13, 2021
@wzshiming
Copy link
Member Author

/assign @smarterclayton

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
@wzshiming wzshiming force-pushed the feat/subresource-match branch from 32c2b1e to 241a442 Compare June 3, 2021 08:22
@wzshiming
Copy link
Member Author

/assign @soltysh

@wzshiming
Copy link
Member Author

/cc @yliaog

@k8s-ci-robot k8s-ci-robot requested a review from yliaog June 3, 2021 08:24
resource[index+1:] == action.GetSubresource()
}

return resource == action.GetResource().Resource
Copy link
Contributor

Choose a reason for hiding this comment

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

nit.
it may be slightly better to move this to before subresource match, i.e. the order of matching is 1/ * 2/ resource 3/ subresource.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, Updated.

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
@wzshiming wzshiming force-pushed the feat/subresource-match branch from 241a442 to 58833d6 Compare June 4, 2021 02:35
@wzshiming wzshiming requested a review from yliaog June 4, 2021 02:48
@yliaog
Copy link
Contributor

yliaog commented Jun 4, 2021

/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 Jun 4, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wzshiming, yliaog

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 4, 2021
@wzshiming
Copy link
Member Author

/test pull-kubernetes-integration

@k8s-ci-robot k8s-ci-robot merged commit 5c137f1 into kubernetes:master Jun 4, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 4, 2021
@wzshiming wzshiming deleted the feat/subresource-match branch June 4, 2021 09:44
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FakeClientset cannot match subresources
7 participants