dminkovsky / kube-cloud-build

Specify container builds inside your Kubernetes manifests.
MIT License
26 stars 0 forks source link

Improve log streaming #2

Open dminkovsky opened 6 years ago

dminkovsky commented 6 years ago

Current mechanism (streaming output from a forked gcloud) seems unreliable. Examine the call gcloud container builds log --stream makes with --log-http and use that with an equivalent HTTP call.

dminkovsky commented 6 years ago

For now using this as a workaround to stream the latest build request:

gcloud container builds list | head -2 | awk 'NR>1{print $1}' | xargs gcloud container builds log --stream
dminkovsky commented 6 years ago

Having examined gcloud container builds log --stream with --log-http, it appears to works like this:

dminkovsky commented 6 years ago

Could also explore forking gcloud container builds log --stream using Node's spawn instead of currently used exec.