-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
kubectl: fix wait --for=create to work correctly with label selectors #128662
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Omer Aplatony <[email protected]>
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: omerap12 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
As I understand the bug exists because the code only handled the |
Changelog tweak suggestion -Fixed kubectl wait --for=create behavior with label selectors to properly wait for resources with matching labels to appear
+Fixed `kubectl wait --for=create` behavior with label selectors, to properly wait for resources with matching labels to appear. |
Sure. Will fix |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes a bug in
kubectl wait --for=create
when used with label selectors (-l
). Currently, the command exits immediately with "no matching resources found" instead of waiting for resources with matching labels to appear.Example bug behavior:
Before the change, running this:
kubectl wait --for=create pods -l app=myapp
will exits immediately with error:error: no matching resources found
.After this change: waits until matching pods appear or timeout:
error: timed out waiting for the condition
Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1675
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: