-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document Pod termination fault (#1381)
* Document Pod termination fault Signed-off-by: Pablo Chacin <[email protected]> --------- Signed-off-by: Pablo Chacin <[email protected]> Co-authored-by: Roberto Santalla <[email protected]>
- Loading branch information
1 parent
e0c242d
commit 5e1c2cd
Showing
6 changed files
with
76 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
src/data/markdown/docs/40 xk6-disruptor/03 API/01 Faults/03 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,28 @@ | ||
--- | ||
title: 'Pod Termination' | ||
excerpt: 'xk6-disruptor: Pod Termination Fault attributes' | ||
--- | ||
|
||
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| | ||
|
||
|
||
<Blockquote mod="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. | ||
</Blockquote> | ||
|
||
## 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
22 changes: 22 additions & 0 deletions
22
src/data/markdown/docs/40 xk6-disruptor/03 API/02 PodDisruptor/04 TerminatePods.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,22 @@ | ||
--- | ||
title: 'terminatePods()' | ||
excerpt: 'xk6-disruptor: PodDisruptor.terminatePods method' | ||
--- | ||
|
||
`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](/javascript-api/xk6-disruptor/api/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
22 changes: 22 additions & 0 deletions
22
...a/markdown/docs/40 xk6-disruptor/03 API/03 ServiceDisruptor/04 TerminatePods.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,22 @@ | ||
--- | ||
title: 'terminatePods()' | ||
excerpt: 'xk6-disruptor: ServiceDisruptor.terminatePods method' | ||
--- | ||
|
||
`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](/javascript-api/xk6-disruptor/api/faults/pod-termination) | | ||
|
||
|
||
## Example | ||
|
||
<!-- eslint-skip --> | ||
|
||
```javascript | ||
const fault = { | ||
count: 2, | ||
} | ||
disruptor.terminatePods(fault) | ||
``` |