PlatformEngr® Fleet GitOps course

Cheat notes · Module 07 · Product self-service

Ship, promote and roll back

A five-minute review for when you have done this module and want it back in your head. Open the full module for the steps and the lab, or the full text to print.

The idea

Approvals sit where the change is decided, on the pull request: dev deploys after merge, prod waits for an approval, and Git plus GitHub Deployments are the audit trail. Merged is not running; trace it until it is reconciled.

Remember

  • Promotion is a pull request: dev and prod are folders; promoting means changing newTag in prod/kustomization.yaml. The diff is the release note.
  • The production gate: production-gate detects changes that reach prod and waits on the production environment. Non-prod changes skip it, and a skipped job counts as passing.
  • Deployment records: after merge, deployment-record creates a GitHub deployment per product environment, linked to the pull request and issue.
  • Reconciled, not merged: scripts/trace.sh shows, per Application, pending or reconciled for a commit.
  • Rollback is a revert, through the same checks and approval. The UI rollback disables auto-sync and leaves Git wrong.

Pitfalls

  • Pushing straight to main in a hurry: the push is rejected and your local main is ahead of GitHub. Move the commit to a branch (git switch -c hotfix then git branch -f main origin/main) and open a pull request.
  • Saying "deployed" when it is only merged. Deployment records say queued; check the trace or Argo CD.
  • Asking for approvals inside Argo CD. Keep Argo CD fully automatic and the approval on the pull request, so the history is in one place.

Commands

scripts/trace.sh --context kind-platform --selector fleet.gitops/product=checkoutHas Argo CD applied my commit yet, per Application?
git log --oneline -- product-deployments/checkout/prodProd's history: one commit per change
git revert --no-edit HEADRoll back, on a branch, through a pull request

Test yourself

Answer in your head first, then open the answer.

Does a dev-only change need the production approval?

No. The gate job is skipped, which counts as passing.

How do you roll back a bad prod release?

git revert in a pull request, through the same checks and approval.

What does scripts/trace.sh tell you that the merge does not?

Whether Argo CD has synced a revision containing the commit, per Application and cluster.

Where module 07 leaves you: Dev shows its new banner. Prod was promoted to 6.7.1 and then rolled back to 6.7.0 by a revert pull request. Git history and the GitHub Deployments page show who changed what, when.