GitOps: should app code and Kubernetes manifests live in the same repo or separate ones?
AdvancedScenarioBranching Strategies and Releases
Answer
Situation read → Different change rates and audiences argue for separation, though small teams may prefer one repo.
What I'd do →
- Separate config repo for environment state, so deploy history is a clean Git log and access can be tighter.
- CI in the app repo builds the image, then opens a PR (or commits) in the config repo to bump the image tag.
- Argo CD or Flux reconciles from the config repo's
main. - Rollback is
git revertof the bump commit.
Why → Image bumps do not pollute app history, and deploy approval is just a PR review.
Interview tip → Say the trade-off honestly: two repos mean extra plumbing.
More on Branching Strategies and Releases
An eight-person team deploys several times a day. Which branching strategy do you recommend?IntermediateWhen would you choose GitFlow over trunk-based development?IntermediateIn trunk-based development, a feature will take three weeks. How do you merge it daily without exposing it?IntermediateYou are cutting a release. How do you manage the release branch and late fixes?IntermediateShould releases use lightweight or annotated tags?BeginnerA release tag was placed on the wrong commit and has been published. What do you do?Intermediate