I know that "best practice" questions are very subjective and not a good fit for StackOverflow, but I'm not sure where else to ask so I figured I'd give it a try here.
I'm working on building a microservice application. I plan on having one git repostiory per service. So something like:
- An auth service (stores users and password hashes, accepts a username and password as input, outputs a JWT)
- A product list service (stores products, accepts a JWT and product name, outputs product information)
- A comment service (stores product IDs with comments, accepts a product ID, outputs all comments for the product)
- etc
All of these services will run inside of a Kubernetes cluster. So for every service there will be a corresponding Deployment YAML file:
auth-deployment.ymlproducts-deployment.ymlcomments-deployment.yml- etc
My question is: Should I create a separate "devops" repo which contains all of these YAML files (basically one place to see my entire infrastructure in one repository) or should each YAML file live with the code it deploys?