Skip to content

Commit 7e15e4d

Browse files
authored
Fix minor issues with code snippet
1 parent bc9e9e7 commit 7e15e4d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/data/markdown/docs/40 xk6-disruptor/01 Get started/04 Expose Your Application.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,33 @@ Forwarding from 127.0.0.1:8080 -> 80
2323

2424
To be able to inject faults, `xk6-disruptor` must [install an agent on each target](/javascript-api/xk6-disruptor/explanations/how-xk6-disruptor-works) that intercepts the requests and applies the desired disruptions. This process requires any existing connection to the targets to be redirected to the agent.
2525

26-
Due to a existing bug in `kubectl`, the process of installing the disruptor can potentially [break the port forwarding](https://github.com/grafana/xk6-disruptor/issues/254). Notice that this issue happens only if the faults are injected in the service that is exposed using port forward. If the faults are injected in another service not exposed by port-forwarding, there shouldn't be any issue.
26+
Due to an existing bug in `kubectl`, the process of installing the disruptor can potentially [break the port forwarding](https://github.com/grafana/xk6-disruptor/issues/254). Notice that this issue happens only if the faults are injected in the service that is exposed using port forward. If the faults are injected in another service not exposed by port-forwarding, there shouldn't be any issue.
2727

2828
Until this issue is solved in `kubectl`, tests using port forwarding to access a service should ensure the agent is installed in the targets before any traffic is sent by the test.
2929

30-
The simplest way to accomplish this is to ensure the scenario that executes the load (2) starts after the scenario that injects the faults (1):
30+
The simplest way to accomplish this is to ensure the scenario that executes the load (#2) starts after the scenario that injects the faults (#1):
3131

3232
```javascript
3333
scenarios: {
34-
disrupt: { (1)
34+
disrupt: { // #1 inject faults
3535
executor: 'shared-iterations',
3636
iterations: 1,
3737
vus: 1,
3838
exec: "disrupt",
3939
startTime: "0s",
40-
}
41-
load: { (2)
40+
},
41+
load: { // #2 execute load
4242
executor: 'constant-arrival-rate',
4343
rate: 100,
4444
preAllocatedVUs: 10,
4545
maxVUs: 100,
4646
exec: "default",
47-
startTime: '20s', // give time for the agents to be installed
47+
startTime: '20s', // give time for the agents to be installed
4848
duration: "30s",
4949
}
5050
}
5151
```
5252

53-
5453
## As a LoadBalancer service
5554

5655
A service of type [`LoadBalancer`](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/) receives an external IP from an external load-balancer provider.
@@ -102,4 +101,4 @@ It uses the cluster’s IP address as a gateway. The tunnel command exposes the
102101

103102
```console
104103
minikube tunnel
105-
```
104+
```

0 commit comments

Comments
 (0)