mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Have a config in the chaos_recommender dir (#615)
This will make it easy for the users to find, configure and run it. Signed-off-by: Naga Ravi Chaitanya Elluri <nelluri@redhat.com>
This commit is contained in:
committed by
GitHub
parent
3fe22a0d8f
commit
58d5d1d8dc
@@ -7,8 +7,8 @@ This tool profiles an application and gathers telemetry data such as CPU, Memory
|
||||
## Pre-requisites
|
||||
|
||||
- Openshift Or Kubernetes Environment where the application is hosted
|
||||
- Access to the telemetry data via the exposed Prometheus endpoint
|
||||
- Python3
|
||||
- Access to the metrics via the exposed Prometheus endpoint
|
||||
- Python3.9
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -22,14 +22,14 @@ This tool profiles an application and gathers telemetry data such as CPU, Memory
|
||||
$ pip3 install -r requirements.txt
|
||||
Edit configuration file:
|
||||
$ vi config/recommender_config.yaml
|
||||
$ python3.9 utils/chaos_recommender/chaos_recommender.py
|
||||
$ python3.9 utils/chaos_recommender/chaos_recommender.py -c utils/chaos_recommender/recommender_config.yaml
|
||||
```
|
||||
|
||||
2. Follow the prompts to provide the required information.
|
||||
|
||||
## Configuration
|
||||
To run the recommender with a config file specify the config file path with the `-c` argument.
|
||||
You can customize the default values by editing the `krkn/config/recommender_config.yaml` file. The configuration file contains the following options:
|
||||
You can customize the default values by editing the `recommender_config.yaml` file. The configuration file contains the following options:
|
||||
|
||||
- `application`: Specify the application name.
|
||||
- `namespaces`: Specify the namespaces names (separated by coma or space). If you want to profile
|
||||
@@ -115,6 +115,6 @@ You can customize the thresholds and options used for data analysis and identify
|
||||
|
||||
## Additional Files
|
||||
|
||||
- `config/recommender_config.yaml`: The configuration file containing default values for application, namespace, labels, and kubeconfig.
|
||||
- `recommender_config.yaml`: The configuration file containing default values for application, namespace, labels, and kubeconfig.
|
||||
|
||||
Happy Chaos!
|
||||
|
||||
35
utils/chaos_recommender/recommender_config.yaml
Normal file
35
utils/chaos_recommender/recommender_config.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
application: openshift-etcd
|
||||
namespaces: openshift-etcd
|
||||
labels: app=openshift-etcd
|
||||
kubeconfig: ~/.kube/config.yaml
|
||||
prometheus_endpoint: <Prometheus_Endpoint>
|
||||
auth_token: <Auth_Token>
|
||||
scrape_duration: 10m
|
||||
chaos_library: "kraken"
|
||||
log_level: INFO
|
||||
json_output_file: False
|
||||
json_output_folder_path:
|
||||
|
||||
# for output purpose only do not change if not needed
|
||||
chaos_tests:
|
||||
GENERIC:
|
||||
- pod_failure
|
||||
- container_failure
|
||||
- node_failure
|
||||
- zone_outage
|
||||
- time_skew
|
||||
- namespace_failure
|
||||
- power_outage
|
||||
CPU:
|
||||
- node_cpu_hog
|
||||
NETWORK:
|
||||
- application_outage
|
||||
- node_network_chaos
|
||||
- pod_network_chaos
|
||||
MEM:
|
||||
- node_memory_hog
|
||||
- pvc_disk_fill
|
||||
|
||||
threshold: .7
|
||||
cpu_threshold: .5
|
||||
mem_threshold: .5
|
||||
Reference in New Issue
Block a user