Design a CI pipeline that deploys through GitOps without giving CI cluster access.
BeginnerScenarioCI Integration & Progressive Delivery
Answer
Situation read → CI builds, Git deploys.
What I'd do →
- Test, build, scan and push
image:sha-<short>to the registry. - Check out the config repo with a token scoped to that repo only.
yq -i '.image.tag = strenv(TAG)' envs/dev/values.yaml, commit, push with retry on conflicts.- Argo CD auto-syncs dev; staging and prod are promoted by PR.
Why → CI's only privileged action is writing one file in Git, which is reviewed and audited.
Interview tip → Mention retry with git pull --rebase for concurrent pipeline runs.
More on CI Integration & Progressive Delivery
Two pipelines commit tag bumps to the config repo at the same time and one fails with "rejected, non-fast-forward". How do you make it robust?BeginnerShould CI wait for Argo CD to finish deploying before marking the pipeline green?IntermediateYou want automatic rollback when error rates rise after a deploy. How do you build it?IntermediateYour canary uses replica-based weights with 3 replicas and `setWeight: 10`. What actually happens and what do you change?IntermediateProduct wants internal staff to test the new version in production before any customer sees it. How?AdvancedYou want a release to stop at 50% in prod until a human approves. How?Beginner