Docs for Tiltfile helpful workarounds/functions
Closed this issue · 5 comments
jazzdan commented
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]
cyucelen commented
Do you have an answer for how to use str on the blob? My if condition not working because of string to blob comparison.
jazzdan commented
Hey @cyucelen,
You should be able to do something like this:
str(local('kubectl config current-context')).rstrip('\n') == 'docker-for-desktop'
cyucelen commented
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.
jazzdan commented
Maybe the answer to this should be extensions now that we have them
nicks commented
we now have a snippets page for sharing common idioms!
https://docs.tilt.dev/snippets
https://github.com/tilt-dev/tilt.build/blob/master/contributing-snippets.md