Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [CHAOS-7264]: Support correlation percentage in tc-based network experiments #8947

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ permissions:
<td> Packet corruption in percentage. </td>
<td> Default: 100. For more information, go to <a href="#network-packet-corruption">network packet corruption</a>.</td>
</tr>
<tr>
<td> CORRELATION </td>
<td> Degree of dependency between consecutive packets </td>
<td> It should be in range of (0,100]. For more information, go to <a href="#correlation">correlation</a>.</td>
</tr>
<tr>
<td> CONTAINER_RUNTIME </td>
<td> Container runtime interface for the cluster.</td>
Expand Down Expand Up @@ -185,6 +190,37 @@ spec:
value: '60'
```

### Correlation

Degree of dependency between consecutive packets. Tune it by using the `CORRELATION` environment variable.

The following YAML snippet illustrates the use of this environment variable:

[embedmd]:# (./static/manifests/pod-network-corruption/correlation.yaml yaml)
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-corruption
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
```

### Destination IPs and destination hosts

Default IPs and hosts whose traffic is interrupted due to the network faults. Tune it by using the `DESTINATION_IPS` and `DESTINATION_HOSTS` environment variables, respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ permissions:
<td> Packet duplication (in percentage).</td>
<td> Default: 100 %. For more information, go to <a href="#network-packet-duplication">network packet duplication</a>.</td>
</tr>
<tr>
<td> CORRELATION </td>
<td> Degree of dependency between consecutive packets </td>
<td> It should be in range of (0,100]. For more information, go to <a href="#correlation">correlation</a>.</td>
</tr>
<tr>
<td> CONTAINER_RUNTIME </td>
<td> Container runtime interface for the cluster. </td>
Expand Down Expand Up @@ -186,6 +191,37 @@ spec:
value: "60"
```

### Correlation

Degree of dependency between consecutive packets. Tune it by using the `CORRELATION` environment variable.

The following YAML snippet illustrates the use of this environment variable:

[embedmd]:# (./static/manifests/pod-network-duplication/correlation.yaml yaml)
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-duplication
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
```

### Destination IPs and destination hosts

Default IPs and hosts whose traffic is interrupted due to the network faults. Tune it by using the `DESTINATION_IPS` and `DESTINATION_HOSTS` environment variables, respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ permissions:
<td> Delay (in milliseconds). Provide numeric values. </td>
<td> Defaults to 2000. For more information, go to <a href="#network-latency">network latency</a>.</td>
</tr>
<tr>
<td> CORRELATION </td>
<td> Degree of dependency between consecutive packets </td>
<td> It should be in range of (0,100]. For more information, go to <a href="#correlation">correlation</a>.</td>
</tr>
<tr>
<td> JITTER </td>
<td> Network jitter (in milliseconds). Provide numeric values. </td>
Expand Down Expand Up @@ -199,6 +204,37 @@ spec:
value: "60"
```

### Correlation

Degree of dependency between consecutive packets. Tune it by using the `CORRELATION` environment variable.

The following YAML snippet illustrates the use of this environment variable:

[embedmd]:# (./static/manifests/pod-network-latency/correlation.yaml yaml)
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-latency
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
```

### Destination IPs and destination hosts

Default IPs and hosts whose traffic is interrupted due to the network faults. Tune it by using the `DESTINATION_IPS` and `DESTINATION_HOSTS` environment variabes, respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ permissions:
<td> Packet loss (in percentage). </td>
<td> Default: 100 %. For more information, go to <a href="#network-packet-loss">network packet loss</a>. </td>
</tr>
<tr>
<td> CORRELATION </td>
<td> Degree of dependency between consecutive packets </td>
<td> It should be in range of (0,100]. For more information, go to <a href="#correlation">correlation</a>.</td>
</tr>
<tr>
<td> CONTAINER_RUNTIME </td>
<td> Container runtime interface for the cluster. </td>
Expand Down Expand Up @@ -186,6 +191,38 @@ spec:
- name: TOTAL_CHAOS_DURATION
value: '60'
```

### Correlation

Degree of dependency between consecutive packets. Tune it by using the `CORRELATION` environment variable.

The following YAML snippet illustrates the use of this environment variable:

[embedmd]:# (./static/manifests/pod-network-loss/correlation.yaml yaml)
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-loss
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
```

### Destination IPs and destination hosts

Default IPs and hosts whose traffic is interrupted because of the network faults. Tune it by using the `DESTINATION_IPS` and `DESTINATION_HOSTS` environment variables, respectively.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-corruption
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-duplication
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-latency
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: litmus-admin
experiments:
- name: pod-network-loss
spec:
components:
env:
- name: CORRELATION
value: '100' #in percentage
- name: TOTAL_CHAOS_DURATION
value: '60'
Loading