top | item 20338752

(no title)

tylfin | 6 years ago

I might be a little slow here, but I don't think I totally understand the use-case.

The parallel docker build / pushing to a registry is definitely cool.

Isn't the parallel Kubernetes deployment the same as `kubectl apply -f .`?

My experience has always been: GitOps w/ version controlled yaml so when a deploy is triggered all the tests run, if that's successful then a sed is performed to replace some placeholder with the new image tags then it's just `kubectl apply -f .`

discuss

order

colinchartier|6 years ago

Take a look at the sanic-site project's deployment.yaml [1]: Since it's a go website, the yaml is written in go templates, but the goal is that you should choose whatever templating language you already use for your website

I've used sed in the past, but it's a huge hassle to do more complicated things (i.e., use different namespaces / taints / resource limits / ... per environment)

I disagree with the way kustomize and jsonnet approach this, learning a new templating language is almost never the right solution. As a bonus, sanic spits out exactly the files it applies so that you can easily find the error in your template without needing to go across multiple files

Finally, this allows you to volume mount your source code folder to avoid having to rebuild after every little change (see the "devmount" part in [1])

[1] https://github.com/distributed-containers-inc/sanic-site/blo...

cppforlife|6 years ago

> ...but the goal is that you should choose whatever templating language you already use for your website

most common templating languages (especially textual templating languages like go's text/template lib) are not great at templating structures (yaml, json, etc.). you quickly run into indentation, escaping and similar problems.

> I disagree with the way kustomize and jsonnet approach this, learning a new templating language is almost never the right solution.

i've recently open sourced a tool ytt (https://get-ytt.io) that is yaml structure aware, to avoid problems mentioned above. i do agree that learning new tool/language is an overhead but it's been interesting to try to build a tool on top of common tech, yaml and python-like language (starlark), to ease the learning curve.

good to see that your tool allows integration with other templating tools.