Open aaronmondal opened 3 weeks ago
Yes, you are right and this is a bug. ResourceFinder seems to be returning error nil when no resource has been found with the given label selector. /triage accepted /priority important-soon
/cc @soltysh
Yes, you are right and this is a bug. ResourceFinder seems to be returning error nil when no resource has been found with the given label selector. /triage accepted /priority important-soon
/cc @soltysh
I'm glad to take a look at that bug if that's alright with you.
@omerap12 sounds good. Thank you.
/assign
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)