37 lines
989 B
Markdown
37 lines
989 B
Markdown
|
||
openfeign依据consul中的服务找到对应的pod的ip:port。蓝绿怎么做?
|
||
|
||
```mermaid
|
||
flowchart TD
|
||
subgraph Client Side
|
||
A[Spring Boot App with OpenFeign] -->|Call my-service| B[Spring Cloud LoadBalancer]
|
||
end
|
||
|
||
subgraph Consul
|
||
B -->|Query my-service instances| C[Consul Service Discovery]
|
||
C -->|Return instances with tags/meta| D[Instance List with version info]
|
||
end
|
||
|
||
subgraph K8s Cluster
|
||
D -->|Filter version=blue/green| E[Service Selector / LoadBalancer]
|
||
|
||
subgraph Blue Deployment
|
||
E --> F[Pod Blue 1]
|
||
E --> G[Pod Blue 2]
|
||
end
|
||
|
||
subgraph Green Deployment
|
||
E --> H[Pod Green 1]
|
||
E --> I[Pod Green 2]
|
||
end
|
||
end
|
||
|
||
%% Optional: Gateway / Ingress for traffic control
|
||
subgraph Gateway/Ingress Layer
|
||
J[Ingress / Service Mesh] -.-> E
|
||
J -->|Route 90% blue, 10% green| F
|
||
J -->|Route 90% blue, 10% green| H
|
||
end
|
||
```
|
||
|