Skip to content

Commit

Permalink
docs: Fix AWS App Mesh getting started documentation to avoid connect…
Browse files Browse the repository at this point in the history
…ion pooling problems

Signed-off-by: Joe Rice <[email protected]>
  • Loading branch information
joesbigidea committed May 26, 2023
1 parent 05c3d90 commit 97fc5ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions docs/getting-started/appmesh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ respectively. In addition, there is a virtual-service named `rollout-demo-vsvc`
virtual-router CR named `rollout-demo-vrouter`. This virtual-router need have at least one route with action to forward
traffic to the canary and stable virtual-nodes. Initially weight for canary is set to 0% while for stable it is 100%.
During rollout, controller will modify the weights on route(s) based on the configuraiton defined in
`steps[N].setWeight`.
`steps[N].setWeight`.

The canary and stable services are configured to be headless. This is necessary to allow App Mesh to properly handle
conneciton pooling as pods are reassigned from canary to stable.

To summarize, run the following commands to deploy a service:

Expand All @@ -69,8 +72,8 @@ To summarize, run the following commands to deploy a service:
* A rollout

```shell
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/appmesh/canary-service.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/appmesh/canary-rollout.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/examples/appmesh/canary-service.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/examples/appmesh/canary-rollout.yaml
```
## 2. Verify service

Expand Down
12 changes: 8 additions & 4 deletions examples/appmesh/canary-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ metadata:
name: my-svc-canary
namespace: argo-examples
spec:
clusterIP: None
ports:
- port: 80
targetPort: http
Expand All @@ -55,6 +56,7 @@ metadata:
name: my-svc-stable
namespace: argo-examples
spec:
clusterIP: None
ports:
- port: 80
targetPort: http
Expand Down Expand Up @@ -114,11 +116,12 @@ spec:
rollouts-pod-template-hash: canary-tbd
listeners:
- portMapping:
port: 80
port: 8080
protocol: http
serviceDiscovery:
dns:
hostname: my-svc-canary.argo-examples.svc.cluster.local
responseType: ENDPOINTS

---
apiVersion: appmesh.k8s.aws/v1beta2
Expand All @@ -133,11 +136,12 @@ spec:
rollouts-pod-template-hash: stable-tbd
listeners:
- portMapping:
port: 80
port: 8080
protocol: http
serviceDiscovery:
dns:
hostname: my-svc-stable.argo-examples.svc.cluster.local
responseType: ENDPOINTS

---
apiVersion: appmesh.k8s.aws/v1beta2
Expand Down Expand Up @@ -176,8 +180,8 @@ spec:
containers:
- name: wrk
image: argoproj/load-tester:latest
command:
command:
- /bin/sh
- -c
- -c
- -x
- "while true; do wrk -t10 -c40 -d2m -s report.lua http://my-svc.argo-examples/color; jq -e '.errors_ratio <= 0.35 and .latency_avg_ms < 100' report.json; done"

0 comments on commit 97fc5ff

Please sign in to comment.