This is how I develop a deployment flow to PROD
1. Merge code to develop
2. Build & publish artifactory
A github action will be triggered on push: develop, this action will build & publish the container image to artifactory (harbor)
3. Watch image registry changes
Flux will periodically watch registry change, and trigger Reconcile if needed
4. Rolling deploy to dev environment
FluxCD perform reconcile that trigger a rolling deployment of the application on dev environment.
5. Monitor status
Notification-Controller will monitor status of the application helm release. The status of deployment will be send to github to sync the deployment
6. Dispatch helm upgrade events to github for dev
Dispatch an github action to:
- Create a deployment on (Github)?
- Sync the status (Success or Fail)
- If Success, perform step 7.
7. Create a PR to promote prod deploy
If dev deployment is success, then raise a PR to patch the PROD manifest with the image tag
8. Watch prod manifest
9. Rolling deploy to prod
If a PR in step 7 has been approved, Flux watch the change in step 8, and start reconciling. A deployment will be made to PROD
10. Monitor prod deployment
Same with step 5, and sync the status to github if deployment is failed