Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
When running the command without selectors, everything seems to work:
kubectl wait deployment/web --for condition=available --timeout=100s
It waits until the condition is met, and then outputs:
deployment.extensions/web condition met
Or, if it can't find a resource, it outputs:
Error from server (NotFound): deployment.extensions "web" not found.
Which is expected and a useful output.
However, when using selectors, if nothing is matched, it simply returns and does not output anything. For example, if I have a deployment with app=http-server, using selectors still works:
kubectl wait deployment -l app=http-server --for condiiton=available --timeout=100s
Output:
deployment.extensions/http-server condition met
However, with an invalid selector, it just returns without saying anything was found:
kubectl wait deployment -l app=http-server2 --for condiiton=available --timeout=100s
(No output from terminal, instant return). It would be much more useful to mimic the behavior when not using a selector, to say that a resource was not found.
Anything else we need to know?:
Environment:
kubectl version
):Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-04-27T09:22:21Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.5", GitCommit:"32ac1c9073b132b8ba18aa830f46b77dcceb0723", GitTreeState:"clean", BuildDate:"2018-06-21T11:34:22Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
/sig cli
I'm going to work on this. I don't know kubernetes source code very well, so, probably, it will take some time.
@m1kola Congrats on your first PR to k8s! I appreciate the quick turnaround on that!
Most helpful comment
@m1kola Congrats on your first PR to k8s! I appreciate the quick turnaround on that!