We basically did the same thing except we used Ansible for our templating. This allows us to store all our shared "environment configuration data", e.g., name of RDS for services in prod environment, name of backup S3 bucket for services in dev environment, in an Ansible role then just pull that information into our templated deployment manifest file. So far, it's worked out pretty well for us.
I do something similar, but envsubst does the job.
+1 on envsubst, it's the minimal solution to the problem of templating kubernetes (of course YMMV, we are a small team and don't need more complex stuff)
Re:Kubernetes at GitHub
by brianwawok on Wednesday August 16, 2017 @06:30PM
(#15031905)
Ditto me too to get my git sha into my image names and deploy with deployments.
Example command can be
The service.yml contains the full deployment configuration, service definition and ingress rules. So this works without preconfiguring anything in kubernetes when deploying an new service.An engineer only has to create the service.yml and Jenkins does deploy it automatically on every master build.
*kexpand is a small tool which does something similar to sed, but in a simpler and less powerful way (keep it simple): https://github.com/kopeio/kexpand