GoogleCloudPlatform / gke-gitops-tutorial-cloudbuild

GitOps-style Continuous Delivery For Kubernetes Engine With Cloud Build
https://cloud.google.com/kubernetes-engine/docs/tutorials/gitops-cloud-build
Apache License 2.0
119 stars 106 forks source link

Handling multiple environments #2

Closed pdoreau closed 5 years ago

pdoreau commented 5 years ago

This tutorial is great ! It shows clearly how to make everything work with one environment, production. What would be the extra steps to handle multiple environments ?

It would be interesting to add at least few lines for those interested to run one or more staging envs in a company for example.

What do you think ?

MrTrustor commented 5 years ago

Hi,

For this particular setup, the most straightforward way to add environments is to use different branches in the "env" repository. However, because you probably have a few differences between environments (of configuration mainly, reflected in ConfigMaps and Secrets), this requires more than a simple "sed" as shown in the tutorial to generate the YAML. This where a tool like kustomize becomes handy.

I'll add a note to the tutorial itself.