Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

draft connect should wait for pods to come up before establishing connection #329

Closed squillace closed 6 years ago

squillace commented 7 years ago

for all apps, the UX for the current draft up to draft connect has a gap: the starting of the containers. It doesn't take that long on minikube, end even shorter in the cloud with bigger machines, but I'm wondering whether it's not a better experience to check the pods for completion as part of the Building, Pushing, Releasing.... stages. Truth is, "Releasing" is really, "deploying the chart" and as a result, it returns SUCCESS when your chart is deployed but the containers are unready. This means that you are lead to expect that you can immediately draft connect, but that fails for short while until the pods are running.

Below, after Releasing comes back as success, on my minikube there's about ten seconds to wait before you can use draft connect.

image

bacongobbler commented 7 years ago

In draft.toml you can set wait to true to make draft wait until the pods have deployed and are running. This is disabled by default due helm's --wait flag being relatively flaky, but it would be great for demos to flip this flag.

related: https://github.com/Azure/draft/issues/200

bacongobbler commented 7 years ago

The Draft User Guide goes into a little more detail on what can be tuned in draft.toml.

bacongobbler commented 6 years ago

re-titled the issue to better reflect the work required here to fix this. The end result is that one should be able to run draft up && draft connect, which will then grab them a connection to the pods once they're up.

cc @michelleN

radu-matei commented 6 years ago

Don't have experience with the Helm --wait flag, but can't we simply wait for the pods to be running by using the Kubernetes client directly?

Something similar to this.