-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/sources/v0.47.x/javascript-api/xk6-disruptor/faults/pod-termination.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: 'Pod Termination' | ||
description: 'xk6-disruptor: Pod Termination Fault attributes' | ||
weight: 03 | ||
--- | ||
|
||
# Pod Termination | ||
|
||
A Pod Termination Fault allows terminating either a fixed number or a percentage of the pods that matching a selector or back a service. | ||
|
||
A Pod Termination fault is defined by the following attributes: | ||
|
||
| Attribute | Type | Description | | ||
| ------------- | ------ | --------| | ||
| count | integer or percentage | the number of pods to be terminated. It can be specified as a integer number or as a percentage (e.g. `30%`) that defines the fraction of target pods to be terminated| | ||
|
||
{{% admonition type="note" %}} | ||
|
||
If the count is a percentage and there are no enough elements in the target pod list, the number is rounded up. | ||
For example '25%' of a list of 2 target pods will terminate one pod. | ||
If the list of target pods is not empty, at least one pod is always terminated. | ||
|
||
{{% /admonition %}} | ||
|
||
## Example | ||
|
||
This example defines a PorTermination fault that will terminate `30%` of target pods | ||
|
||
```javascript | ||
const fault = { | ||
count: '30%' | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
docs/sources/v0.47.x/javascript-api/xk6-disruptor/poddisruptor/terminate-pods.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: 'terminatePods()' | ||
description: 'xk6-disruptor: PodDisruptor.terminatePods method' | ||
--- | ||
|
||
# terminatePods() | ||
|
||
`terminatePods` terminates a number of the pods matching the selector configured in the PodDisruptor. | ||
|
||
| Parameter | Type | Description | | ||
| --------- | ------ |------- | | ||
| fault | object | description of the [Pod Termination fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/pod-termination) | | ||
|
||
## Example | ||
|
||
<!-- eslint-skip --> | ||
|
||
```javascript | ||
const fault = { | ||
count: 2, | ||
} | ||
disruptor.terminatePods(fault) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...sources/v0.47.x/javascript-api/xk6-disruptor/servicedisruptor/terminate-pods.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: 'terminatePods()' | ||
description: 'xk6-disruptor: ServiceDisruptor.terminatePods method' | ||
--- | ||
|
||
# terminatePods() | ||
|
||
`terminatePods` terminates a number of pods that belong to the service specified in the ServiceDisruptor. | ||
|
||
| Parameter | Type | Description | | ||
| --------- | ------ |------- | | ||
| fault | object | description of the [Pod Termination fault](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/xk6-disruptor/faults/pod-termination) | | ||
|
||
## Example | ||
|
||
<!-- eslint-skip --> | ||
|
||
```javascript | ||
const fault = { | ||
count: 2, | ||
} | ||
disruptor.terminatePods(fault) | ||
``` |