Firstly this is in the context of a mono-repo application that runs inside Kubernetes.
In GitOps my understanding is everything is declarative and written in configuration files such as YAML. This allows a full change history within git. Branches represent environments. For example:
- BRANCH develop Could be a deployed QA or staging environment
- BRANCH feature/foo-bar Could be a deployed feature branch for assessment
- TAG v1.2.0 Could be latest version running in production This makes sense to me, any and all branches can be deployed as a running version of the application.
QUESTION I remember reading ... somewhere ... configuration should live outside of the main repository, inside another "configuration repository". From memory the idea is an application should not know a particular configuration... only how to use a configuration?
Is this true? Should I have an application repo and an application configuration repo? e.g.
- app repo:
foo-organisation/bar-application
- config repo:
foo-organisation/bar-application-config
Where the branching model of config for different environments lives inside that repository? Why and what are the advantages?
Otherwise should it just live inside a directory of the app repo?