Skip to content

Commit

Permalink
Documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasar2202 committed Sep 1, 2022
1 parent a8af080 commit 39be68d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ In addition to checking the recovery and health of the cluster and components un
### Roadmap
Following is a list of enhancements that we are planning to work on adding support in Kraken. Of course any help/contributions are greatly appreciated.
- [Ability to visualize the metrics that are being captured by Kraken and stored in Elasticsearch](https://github.com/chaos-kubox/krkn/issues/124)
- Ability to shape the ingress network similar to how Kraken supports [egress traffic shaping](https://github.com/chaos-kubox/krkn/blob/main/docs/network_chaos.md) today.
- Continue to improve [Chaos Testing Guide](https://cloud-bulldozer.github.io/kraken/) in terms of adding best practices, test environment recommendations and scenarios to make sure the OpenShift platform, as well the applications running on top it, are resilient and performant under chaotic conditions.
- Support for running Kraken on Kubernetes distribution - see https://github.com/chaos-kubox/krkn/issues/185, https://github.com/chaos-kubox/krkn/issues/186
- Sweet logo for Kraken - see https://github.com/chaos-kubox/krkn/issues/195
Expand Down
20 changes: 19 additions & 1 deletion docs/network_chaos.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Network chaos
Scenario to introduce network latency, packet loss, and bandwidth restriction in the Node's host network interface. The purpose of this scenario is to observe faults caused by random variations in the network.

##### Sample scenario config
##### Sample scenario config for egress traffic shaping
```
network_chaos: # Scenario to create an outage by simulating random variations in the network.
duration: 300 # In seconds - duration network chaos will be applied.
Expand All @@ -17,6 +17,24 @@ network_chaos: # Scenario to create an outage
bandwidth: 100mbit
```

##### Sample scenario config for ingress traffic shaping (using a plugin)
- id: network_chaos
config:
node_interface_name: # Dictionary with key as node name(s) and value as a list of its interfaces to test
ip-10-0-128-153.us-west-2.compute.internal:
- ens5
- genev_sys_6081
label_selector: node-role.kubernetes.io/master # When node_interface_name is not specified, nodes with matching label_selector is selected for node chaos scenario injection
instance_count: 1 # Number of nodes to perform action/select that match the label selector
kubeconfig_path: /root/.kube/config # Path to kubernetes config file. If not specified, it defaults to ~/.kube/config
execution_type: parallel # Execute each of the ingress options as a single scenario(parallel) or as separate scenario(serial).
network_params:
latency: 50ms
loss: '0.02'
bandwidth: 100mbit
wait_duration: 120
test_duration: 60

##### Steps
- Pick the nodes to introduce the network anomaly either from node_name or label_selector.
- Verify interface list in one of the nodes or use the interface with a default route, as test interface, if no interface is specified by the user.
Expand Down
2 changes: 1 addition & 1 deletion scenarios/openshift/network_chaos_ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
bandwidth: <rate> # Value is a string. For example: 100mbit
wait_duration: <time_duration> # Default is 300. Ensure that it is at least about twice of test_duration
test_duration: <time_duration> # Default is 120
kraken_config: <path> # Specify if you want to use Cerberus config
kraken_config: <path> # Specify this if you want to use Cerberus config
2 changes: 1 addition & 1 deletion tests/test_ingress_network_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_serialization(self):
)
plugin.test_object_serialization(
ingress_shaping.NetworkScenarioSuccessOutput(
traffic_direction="ingress", test_interfaces= {"foo": ['bar']}, network_paramaters={
traffic_direction="ingress", test_interfaces= {"foo": ['bar']}, network_parameters={
"latency": "50ms" , "loss": "0.02", "bandwidth": "100mbit"}, execution_type="parallel"),
self.fail,
)
Expand Down

0 comments on commit 39be68d

Please sign in to comment.