From b12cd5037d6cbc1d7cf66fad4126a505247b0b14 Mon Sep 17 00:00:00 2001 From: Akash Shrivastava Date: Tue, 16 Aug 2022 15:11:24 +0530 Subject: [PATCH] Added HTTP Chaos Toxicity (#563) * improved description of http experiments Signed-off-by: avaakash * Added toxicity env in http chaos Signed-off-by: avaakash Signed-off-by: avaakash --- experiments/generic/pod-http-latency/experiment.yaml | 6 ++++++ experiments/generic/pod-http-modify-body/experiment.yaml | 6 ++++++ .../generic/pod-http-modify-header/experiment.yaml | 8 +++++++- experiments/generic/pod-http-reset-peer/experiment.yaml | 6 ++++++ experiments/generic/pod-http-status-code/experiment.yaml | 7 +++++++ 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/experiments/generic/pod-http-latency/experiment.yaml b/experiments/generic/pod-http-latency/experiment.yaml index 79ab473..bcc4b6d 100644 --- a/experiments/generic/pod-http-latency/experiment.yaml +++ b/experiments/generic/pod-http-latency/experiment.yaml @@ -85,6 +85,12 @@ spec: - name: PROXY_PORT value: "20000" + # toxicity is the probability of the request to be affected + # provide the percentage value in the range of 0-100 + # 0 means no request will be affected and 100 means all request will be affected + - name: TOXICITY + value: "100" + # network interface on which the proxy will listen - name: NETWORK_INTERFACE value: "eth0" diff --git a/experiments/generic/pod-http-modify-body/experiment.yaml b/experiments/generic/pod-http-modify-body/experiment.yaml index 97bfea6..0856d72 100644 --- a/experiments/generic/pod-http-modify-body/experiment.yaml +++ b/experiments/generic/pod-http-modify-body/experiment.yaml @@ -87,6 +87,12 @@ spec: - name: PROXY_PORT value: "20000" + # toxicity is the probability of the request to be affected + # provide the percentage value in the range of 0-100 + # 0 means no request will be affected and 100 means all request will be affected + - name: TOXICITY + value: "100" + # network interface on which the proxy will listen - name: NETWORK_INTERFACE value: "eth0" diff --git a/experiments/generic/pod-http-modify-header/experiment.yaml b/experiments/generic/pod-http-modify-header/experiment.yaml index 7e50fe3..31106dd 100644 --- a/experiments/generic/pod-http-modify-header/experiment.yaml +++ b/experiments/generic/pod-http-modify-header/experiment.yaml @@ -90,7 +90,13 @@ spec: # port on which the proxy will listen - name: PROXY_PORT value: "20000" - + + # toxicity is the probability of the request to be affected + # provide the percentage value in the range of 0-100 + # 0 means no request will be affected and 100 means all request will be affected + - name: TOXICITY + value: "100" + # network interface on which the proxy will listen - name: NETWORK_INTERFACE value: "eth0" diff --git a/experiments/generic/pod-http-reset-peer/experiment.yaml b/experiments/generic/pod-http-reset-peer/experiment.yaml index ec36fc5..f5f6f83 100644 --- a/experiments/generic/pod-http-reset-peer/experiment.yaml +++ b/experiments/generic/pod-http-reset-peer/experiment.yaml @@ -86,6 +86,12 @@ spec: - name: PROXY_PORT value: "20000" + # toxicity is the probability of the request to be affected + # provide the percentage value in the range of 0-100 + # 0 means no request will be affected and 100 means all request will be affected + - name: TOXICITY + value: "100" + # network interface on which the proxy will listen - name: NETWORK_INTERFACE value: "eth0" diff --git a/experiments/generic/pod-http-status-code/experiment.yaml b/experiments/generic/pod-http-status-code/experiment.yaml index f8994df..8d11805 100644 --- a/experiments/generic/pod-http-status-code/experiment.yaml +++ b/experiments/generic/pod-http-status-code/experiment.yaml @@ -77,6 +77,7 @@ spec: # modified status code for the http response # if no value is provided, a random status code from the supported code list will selected # if an invalid status code is provided, the experiment will fail + # if multiple comma separated values are provided, then a random value from the provided list will be selected # supported status code list: [200, 201, 202, 204, 300, 301, 302, 304, 307, 400, 401, 403, 404, 500, 501, 502, 503, 504] - name: STATUS_CODE value: '' @@ -92,6 +93,12 @@ spec: # port on which the proxy will listen - name: PROXY_PORT value: "20000" + + # toxicity is the probability of the request to be affected + # provide the percentage value in the range of 0-100 + # 0 means no request will be affected and 100 means all request will be affected + - name: TOXICITY + value: "100" # network interface on which the proxy will listen - name: NETWORK_INTERFACE