From 906f9a92ead9bcfbac3fc108369b1b6b8ca6f271 Mon Sep 17 00:00:00 2001 From: Joe Rice Date: Tue, 30 May 2023 10:39:36 -0500 Subject: [PATCH] docs: Fix AWS App Mesh getting started documentation to avoid connection pooling problems (#2814) Signed-off-by: Joe Rice --- docs/getting-started/appmesh/index.md | 9 ++++++--- examples/appmesh/canary-service.yaml | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/getting-started/appmesh/index.md b/docs/getting-started/appmesh/index.md index 7378f85820..85399fe12f 100644 --- a/docs/getting-started/appmesh/index.md +++ b/docs/getting-started/appmesh/index.md @@ -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: @@ -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 diff --git a/examples/appmesh/canary-service.yaml b/examples/appmesh/canary-service.yaml index 1523266471..bf1995db12 100644 --- a/examples/appmesh/canary-service.yaml +++ b/examples/appmesh/canary-service.yaml @@ -39,6 +39,7 @@ metadata: name: my-svc-canary namespace: argo-examples spec: + clusterIP: None ports: - port: 80 targetPort: http @@ -55,6 +56,7 @@ metadata: name: my-svc-stable namespace: argo-examples spec: + clusterIP: None ports: - port: 80 targetPort: http @@ -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 @@ -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 @@ -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"