Command should exit with 1 if not --wait
ORESoftware opened this issue · 4 comments
I ran this:
kail --svc frontend --deploy webapp
I have no service named frontend or deployment named webapp, so it should eventually fail right? If you want it to keep looking for awhile (if services are starting up etc), then maybe a wait option?
kail --svc frontend --deploy webapp --wait=20
20 seconds or trying every 2 seconds?
It's always looking for new pods, whether finds any when it first starts or not. This is by design - you can just leave it open in a terminal while tinkering with your k8s objects, for instance.
If you want it to print what it would match and then exit, you can use --dry-run
.
@ORESoftware if you have a workflow that would be helped by a "max time to wait for first pod" flag, let me know. I'd be open to adding one if it'd be helpful for, say, some kind of automation workflow.
for sure, let me think about it
one thing - if it didn't match anything on the first try - log something like:
kail did not find any matching services/pods on the first looking, waiting for some matches