kubectl wait --for=create doesn't work with selectors #1675
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened?
This works:
But for generated resources where we need to filter, this immediately exits with
error: no matching resources found
:What did you expect to happen?
I'd expect
kubectl wait --for=create
to still wait when used with-l
. Otherwise we're back to hacky sleeps and bash loops in cases where resource names are unknown (i.e. generated).How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
I didn't test anything other than
-l
, but other filtering mechanisms might be broken with--for=create
as well.This issue is especially noticeable when working with generated resources. For instance, you might have some trigger after a while to invoke e.g. a Tekton PipelineRun. These PipelineRuns have predictable labels but unpredictable names, making name-based waiting impossible.
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: