canonical / charmed-kubeflow-chisme

Shared Utilities used across Charmed Kubeflow
Apache License 2.0
1 stars 4 forks source link

add a `block_until_ready` to Kubernetes actions like apply or maybe delete #54

Open ca-scribner opened 1 year ago

ca-scribner commented 1 year ago

Sometimes, it is useful to do something in kubernetes (eg: apply) and then wait for those resources to be ready before continuing. We have done this in past sometimes by locally implementing a watcher loop around some lightkube code.

It would be nice if this option was available, perhaps as an option to KRH.apply(... block_until_ready=True) and similar commands? If we implement this, we could do something like apply the resources as normal and then loop around them waiting until they all show a ready status.