diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-corruption.md b/mkdocs/docs/experiments/categories/pods/pod-network-corruption.md index 346766edc2f..502268885a3 100644 --- a/mkdocs/docs/experiments/categories/pods/pod-network-corruption.md +++ b/mkdocs/docs/experiments/categories/pods/pod-network-corruption.md @@ -330,6 +330,45 @@ spec: value: '60' ``` +### Blacklist Source and Destination Ports + +By default, the network experiments disrupt traffic for all the source and destination ports. The specific ports can be blacklisted via `SOURCE_PORTS` and `DESTINATION_PORTS` ENV. + +- `SOURCE_PORTS`: Provide the comma separated source ports preceded by `!`, that you'd like to blacklist from the chaos. +- `DESTINATION_PORTS`: Provide the comma separated destination ports preceded by `!` , that you'd like to blacklist from the chaos. + +Use the following example to tune this: + +[embedmd]:# (pod-network-corruption/blacklist-source-and-destination-ports.yaml yaml) +```yaml +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-corruption-sa + experiments: + - name: pod-network-corruption + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + ### Network Interface The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-corruption/blacklist-source-and-destination-ports.yaml b/mkdocs/docs/experiments/categories/pods/pod-network-corruption/blacklist-source-and-destination-ports.yaml new file mode 100644 index 00000000000..28cbeacd2a6 --- /dev/null +++ b/mkdocs/docs/experiments/categories/pods/pod-network-corruption/blacklist-source-and-destination-ports.yaml @@ -0,0 +1,26 @@ +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-corruption-sa + experiments: + - name: pod-network-corruption + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-duplication.md b/mkdocs/docs/experiments/categories/pods/pod-network-duplication.md index 9119eafd027..6fa453e9338 100644 --- a/mkdocs/docs/experiments/categories/pods/pod-network-duplication.md +++ b/mkdocs/docs/experiments/categories/pods/pod-network-duplication.md @@ -331,6 +331,45 @@ spec: value: '60' ``` +### Blacklist Source and Destination Ports + +By default, the network experiments disrupt traffic for all the source and destination ports. The specific ports can be blacklisted via `SOURCE_PORTS` and `DESTINATION_PORTS` ENV. + +- `SOURCE_PORTS`: Provide the comma separated source ports preceded by `!`, that you'd like to blacklist from the chaos. +- `DESTINATION_PORTS`: Provide the comma separated destination ports preceded by `!` , that you'd like to blacklist from the chaos. + +Use the following example to tune this: + +[embedmd]:# (pod-network-duplication/blacklist-source-and-destination-ports.yaml yaml) +```yaml +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-duplication-sa + experiments: + - name: pod-network-duplication + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + ### Network Interface The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-duplication/blacklist-source-and-destination-ports.yaml b/mkdocs/docs/experiments/categories/pods/pod-network-duplication/blacklist-source-and-destination-ports.yaml new file mode 100644 index 00000000000..3b34ecc0137 --- /dev/null +++ b/mkdocs/docs/experiments/categories/pods/pod-network-duplication/blacklist-source-and-destination-ports.yaml @@ -0,0 +1,26 @@ +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-duplication-sa + experiments: + - name: pod-network-duplication + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-latency.md b/mkdocs/docs/experiments/categories/pods/pod-network-latency.md index e4034fe337b..d31e2610c53 100644 --- a/mkdocs/docs/experiments/categories/pods/pod-network-latency.md +++ b/mkdocs/docs/experiments/categories/pods/pod-network-latency.md @@ -340,6 +340,45 @@ spec: value: '60' ``` +### Blacklist Source and Destination Ports + +By default, the network experiments disrupt traffic for all the source and destination ports. The specific ports can be blacklisted via `SOURCE_PORTS` and `DESTINATION_PORTS` ENV. + +- `SOURCE_PORTS`: Provide the comma separated source ports preceded by `!`, that you'd like to blacklist from the chaos. +- `DESTINATION_PORTS`: Provide the comma separated destination ports preceded by `!` , that you'd like to blacklist from the chaos. + +Use the following example to tune this: + +[embedmd]:# (pod-network-latency/blacklist-source-and-destination-ports.yaml yaml) +```yaml +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-latency-sa + experiments: + - name: pod-network-latency + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + ### Network Interface The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-latency/blacklist-source-and-destination-ports.yaml b/mkdocs/docs/experiments/categories/pods/pod-network-latency/blacklist-source-and-destination-ports.yaml new file mode 100644 index 00000000000..58a9eec4e13 --- /dev/null +++ b/mkdocs/docs/experiments/categories/pods/pod-network-latency/blacklist-source-and-destination-ports.yaml @@ -0,0 +1,26 @@ +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-latency-sa + experiments: + - name: pod-network-latency + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-loss.md b/mkdocs/docs/experiments/categories/pods/pod-network-loss.md index 25df009a53d..c6cedf01742 100644 --- a/mkdocs/docs/experiments/categories/pods/pod-network-loss.md +++ b/mkdocs/docs/experiments/categories/pods/pod-network-loss.md @@ -331,6 +331,45 @@ spec: value: '60' ``` +### Blacklist Source and Destination Ports + +By default, the network experiments disrupt traffic for all the source and destination ports. The specific ports can be blacklisted via `SOURCE_PORTS` and `DESTINATION_PORTS` ENV. + +- `SOURCE_PORTS`: Provide the comma separated source ports preceded by `!`, that you'd like to blacklist from the chaos. +- `DESTINATION_PORTS`: Provide the comma separated destination ports preceded by `!` , that you'd like to blacklist from the chaos. + +Use the following example to tune this: + +[embedmd]:# (pod-network-loss/blacklist-source-and-destination-ports.yaml yaml) +```yaml +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-loss-sa + experiments: + - name: pod-network-loss + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' +``` + ### Network Interface The defined name of the ethernet interface, which is considered for shaping traffic. It can be tuned via `NETWORK_INTERFACE` ENV. Its default value is `eth0`. diff --git a/mkdocs/docs/experiments/categories/pods/pod-network-loss/blacklist-source-and-destination-ports.yaml b/mkdocs/docs/experiments/categories/pods/pod-network-loss/blacklist-source-and-destination-ports.yaml new file mode 100644 index 00000000000..62482ec2c21 --- /dev/null +++ b/mkdocs/docs/experiments/categories/pods/pod-network-loss/blacklist-source-and-destination-ports.yaml @@ -0,0 +1,26 @@ +# blacklist the source and destination ports +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: engine-nginx +spec: + engineState: "active" + annotationCheck: "false" + appinfo: + appns: "default" + applabel: "app=nginx" + appkind: "deployment" + chaosServiceAccount: pod-network-loss-sa + experiments: + - name: pod-network-loss + spec: + components: + env: + # it will blacklist 80 and 8080 source ports + - name: SOURCE_PORTS + value: '!80,8080' + # it will blacklist 8080 and 9000 destination ports + - name: DESTINATION_PORTS + value: '!8080,9000' + - name: TOTAL_CHAOS_DURATION + value: '60' \ No newline at end of file