Add/blue green deploy workflow - #586
Merged
LaGodxy merged 2 commits intoApr 30, 2026
Merged
Conversation
added 2 commits
April 29, 2026 10:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a complete blue-green deploy workflow for EKS with manual dispatch, kubeconfig configuration, image build/push, post-switch health checks and automatic rollback.
What changed
.github/workflows/blue-green-deploy.yml: workflow (manual workflow_dispatch, build/push, aws eks update-kubeconfig, deploy + rollback)
blue-green-deploy.sh, blue-green-rollback.sh, integration_test.sh: deploy/rollback/integration test scripts
k8s manifests: deployment + service templates used by the workflow
IAM_CI_POLICY.md, SECRETS.md: instructions for IAM, OIDC and repository secrets
Why
Provide a safe blue/green rollout that lets owners run deployments from Actions or CI, verify health via service DNS, and automatically rollback on failure.
Required repository secrets
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
EKS_CLUSTER_NAME
How to run (owner)
From Actions UI: select Blue-Green Deploy to EKS → Run workflow (choose branch/main).
Or merge to main (push will trigger it).
Example manual/test (locally with kube access):
Testing notes
Run in a non-prod namespace first (e.g., staging).
Ensure the service myapp-service exists and pods expose /healthz on the probe port.
The workflow will:
build and push image
update kubeconfig via aws eks update-kubeconfig
deploy the new colored deployment (myapp-blue / myapp-green)
patch myapp-service selector to the new version
run post-switch health checks (ephemeral curl pod)
rollback automatically if checks fail
Rollback / Recovery
Automatic rollback runs on failure.
Manual rollback:
Security & recommendations
Do NOT commit AWS keys or kubeconfig.
Prefer GitHub Actions OIDC to avoid long-lived AWS keys (see IAM_CI_POLICY.md).
Use least-privilege IAM role; map role to a restricted Kubernetes ClusterRole instead of system:masters where possible.
Checklist before merging
Add the required repository secrets listed above.
Confirm deployment-template.yaml and service.yaml match the running cluster (namespaces, probe path/port).
closes #460