tilt-dev/tilt.build

Docs for Tiltfile helpful workarounds/functions

Closed this issue · 5 comments

We should describe useful tips and tricks, like how to use str on the blob created by local and how to die on the wrong cluster.

[as mentioned in Kubernetes slack]

[ported from windmilleng/tilt]

Do you have an answer for how to use str on the blob? My if condition not working because of string to blob comparison.

Hey @cyucelen,

You should be able to do something like this:

str(local('kubectl config current-context')).rstrip('\n') == 'docker-for-desktop'

It would very helpful to put this kind of recipes to the docs. I can also contribute if you have the place to put it.

Maybe the answer to this should be extensions now that we have them