@@ -65,28 +65,54 @@ stateDiagram
65
65
Deploy --> [ProdInstance1]: Blue
66
66
Deploy --> [ProdInstance2]: Green
67
67
```
68
+ ## Blue-Green Deployment Strategy Diagram
69
+
70
+ ``` mermaid
71
+ sequenceDiagram
72
+ participant C as Commit
73
+ participant G as GitHub Actions
74
+ participant H as Helm
75
+ participant K as Kubernetes
76
+ C->>G: Developer pushes a commit
77
+ G->>G: GitHub Actions extracts the commit message
78
+ Note over G: GitHub Actions checks if the commit message starts with [v1]
79
+ alt Commit message starts with [v1]
80
+ G->>H: GitHub Actions tells Helm to update the app without changing the v2 image
81
+ Note over G: The v2 image remains the same
82
+ else Commit message does not start with [v1]
83
+ G->>H: GitHub Actions tells Helm to update the app and change the v2 image
84
+ Note over G: The v2 image is updated to the new version
85
+ end
86
+ H->>K: Helm deploys or updates the Kubernetes resources
87
+ G->>K: GitHub Actions checks the status of the deployments
88
+ ```
68
89
## App deployment flow - in this diagram
69
- - User sends a request to the Load Balancer
70
- - Load Balancer routes the request to the Kubernetes Service
71
- - Kubernetes Service routes the request to the Spring Boot App
72
- - Spring Boot App queries the Database
73
- - Database returns data to the Spring Boot App
74
- - Spring Boot App checks the Feature Flag
75
- - Feature Flag returns the flag status to the Spring Boot App
76
- - Spring Boot App checks the Redis Cache
77
- - Redis Cache returns the session data to the Spring Boot App
78
- - Spring Boot App returns the response to the User
79
- - App Startup deploys the Database
80
- - Canary Deployment spins up new pods
81
- - Rollback triggers a Canary Deployment
82
- - Canary Deployment deploys the previous stable Docker image
83
- - Canary Deployment reverts database changes
84
- - Promote deploys to all pods
85
- - Monitoring alerts the Ops Team
86
- - Ops Team fixes issues
87
- - Rollback/Canary Deployment deploys the fix
88
- - New Pods verifies the fix
89
- - Monitoring verifies the fix
90
+ ## User Request Flow
91
+ 1 . User sends a request to the Load Balancer.
92
+ 2 . Load Balancer routes the request to the Kubernetes Service.
93
+ 3 . Kubernetes Service routes the request to the Spring Boot App.
94
+ 4 . Spring Boot App queries the Database.
95
+ 5 . Database returns data to the Spring Boot App.
96
+ 6 . Spring Boot App checks the Feature Flag.
97
+ 7 . Feature Flag returns the flag status to the Spring Boot App.
98
+ 8 . Spring Boot App checks the Redis Cache.
99
+ 9 . Redis Cache returns the session data to the Spring Boot App.
100
+ 10 . Spring Boot App returns the response to the User.
101
+
102
+ ## Deployment Process
103
+ 1 . App Startup deploys the Database.
104
+ 2 . Canary Deployment spins up new pods.
105
+ 3 . Rollback triggers a Canary Deployment.
106
+ 4 . Canary Deployment deploys the previous stable Docker image.
107
+ 5 . Canary Deployment reverts database changes.
108
+ 6 . Promote deploys to all pods.
109
+
110
+ ## Monitoring and Issue Resolution
111
+ 1 . Monitoring alerts the Ops Team.
112
+ 2 . Ops Team fixes issues.
113
+ 3 . Rollback/Canary Deployment deploys the fix.
114
+ 4 . New Pods verifies the fix.
115
+ 5 . Monitoring verifies the fix.
90
116
91
117
``` mermaid
92
118
graph LR
@@ -130,6 +156,7 @@ graph LR
130
156
style R fill:#cf6,stroke:#333,stroke-width:2px
131
157
style S fill:#6cf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5
132
158
```
159
+
133
160
## GitFlow Diagram
134
161
``` mermaid
135
162
graph TB
0 commit comments