Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix AWS App Mesh getting started documentation to avoid connection pooling problems #2814

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"