-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
allow kubectl -f to filter by selector #32599
allow kubectl -f to filter by selector #32599
Conversation
dbb17b4
to
edff79c
Compare
edff79c
to
9e180fe
Compare
GCE e2e build/test passed for commit 9e180fe. |
I would like to shadow this code review |
this is blocking #33698 |
@ymqytw Would you shadow this as well? |
@janetkuo Let me know if you don't have bandwidth for this |
Please add a test for this, e.g. in |
Looks good for now, but need rebase and a test. |
9e180fe
to
c093f1c
Compare
@ymqytw I rebased and added a test |
c093f1c
to
1ad64cf
Compare
Review status: 0 of 6 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. pkg/kubectl/resource/builder.go, line 713 at r2 (raw file):
It should return a error, if len(b.resourceTuples) != 0, shouldn't it? Comments from Reviewable |
1ad64cf
to
6339d91
Compare
@ymqytw Agree. fixed. |
Jenkins GKE smoke e2e failed for commit 6339d91. Full PR test history. The magic incantation to run this job again is |
LGTM |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
@mikedanese Does this support filtering for all commands that support --filename? |
@bgrant0607 it adds infrastructure to but individual commands need to be slightly retrofitted. |
Automatic merge from submit-queue kubectl: implement kubectl apply --prune Closes #19805 Depends on #32599 @errordeveloper @lukemarsden
Automatic merge from submit-queue (batch tested with PRs 40328, 40057) Allows kubectl create -f to filter by selector. From #32544. The underlying `seletor` infrastructrue was implemented by #32599. The test is basically copy-paste of the corresponding test for `kubectl apply -f -l`. ```release-note kubectl create now accepts the label selector flag for filtering objects to create ```
cc @kubernetes/kubectl
Fixes #32544
This change is