From 0f7c1cc4673391e749273ff835cde6a912dd21c8 Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 13 May 2020 07:56:48 -0700 Subject: [PATCH] Update circuit breaker docs (#7272) * Update circuit breaker docs * snips --- .../docs/tasks/traffic-management/circuit-breaking/index.md | 6 +++--- .../docs/tasks/traffic-management/circuit-breaking/snips.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/tasks/traffic-management/circuit-breaking/index.md b/content/en/docs/tasks/traffic-management/circuit-breaking/index.md index 9e0dec9331..8cf003fe35 100644 --- a/content/en/docs/tasks/traffic-management/circuit-breaking/index.md +++ b/content/en/docs/tasks/traffic-management/circuit-breaking/index.md @@ -109,8 +109,8 @@ governed by Istio. Pass in `-curl` to indicate that you just want to make one call: {{< text bash >}} - $ FORTIO_POD=$(kubectl get pod | grep fortio | awk '{ print $1 }') - $ kubectl exec -it "$FORTIO_POD" -c fortio /usr/bin/fortio -- load -curl http://httpbin:8000/get + $ FORTIO_POD=$(kubectl get pods -lapp=fortio -o 'jsonpath={.items[0].metadata.name}') + $ kubectl exec -it "$FORTIO_POD" -c fortio -- /usr/bin/fortio load -curl http://httpbin:8000/get HTTP/1.1 200 OK server: envoy date: Tue, 25 Feb 2020 20:25:52 GMT @@ -150,7 +150,7 @@ one connection and request concurrently, you should see some failures when the (`-n 20`): {{< text bash >}} - $ kubectl exec -it "$FORTIO_POD" -c fortio /usr/bin/fortio -- load -c 2 -qps 0 -n 20 -loglevel Warning http://httpbin:8000/get + $ kubectl exec -it "$FORTIO_POD" -c fortio -- /usr/bin/fortio load -c 2 -qps 0 -n 20 -loglevel Warning http://httpbin:8000/get 20:33:46 I logger.go:97> Log level is now 3 Warning (was 2 Info) Fortio 1.3.1 running at 0 queries per second, 6->6 procs, for 20 calls: http://httpbin:8000/get Starting at max qps with 2 thread(s) [gomax 6] for exactly 20 calls (10 per thread + 0) diff --git a/content/en/docs/tasks/traffic-management/circuit-breaking/snips.sh b/content/en/docs/tasks/traffic-management/circuit-breaking/snips.sh index 4b31839e21..07f58f71f1 100644 --- a/content/en/docs/tasks/traffic-management/circuit-breaking/snips.sh +++ b/content/en/docs/tasks/traffic-management/circuit-breaking/snips.sh @@ -78,8 +78,8 @@ kubectl apply -f <(istioctl kube-inject -f samples/httpbin/sample-client/fortio- } snip_adding_a_client_3() { -FORTIO_POD=$(kubectl get pod | grep fortio | awk '{ print $1 }') -kubectl exec -it "$FORTIO_POD" -c fortio /usr/bin/fortio -- load -curl http://httpbin:8000/get +FORTIO_POD=$(kubectl get pods -lapp=fortio -o 'jsonpath={.items[0].metadata.name}') +kubectl exec -it "$FORTIO_POD" -c fortio -- /usr/bin/fortio load -curl http://httpbin:8000/get } ! read -r -d '' snip_adding_a_client_3_out <<\ENDSNIP @@ -110,7 +110,7 @@ x-envoy-upstream-service-time: 36 ENDSNIP snip_tripping_the_circuit_breaker_1() { -kubectl exec -it "$FORTIO_POD" -c fortio /usr/bin/fortio -- load -c 2 -qps 0 -n 20 -loglevel Warning http://httpbin:8000/get +kubectl exec -it "$FORTIO_POD" -c fortio -- /usr/bin/fortio load -c 2 -qps 0 -n 20 -loglevel Warning http://httpbin:8000/get } ! read -r -d '' snip_tripping_the_circuit_breaker_1_out <<\ENDSNIP