Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
Add image and review docs
  • Loading branch information
SmritiSatya committed Mar 10, 2025
1 parent 243dff3 commit a794da6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,32 +270,32 @@ This fault evaluates the application's resilience to lossy (or flaky) API reques

<FaultDetailsCard category="kubernetes" subCategory="pod">

### Pod API Status Code
### Pod API modify response custom

Pod API status code is a Kubernetes pod-level chaos fault that change the API response status code and optionally api response body through path filtering.
Pod API modify response custom is a Kubernetes pod-level chaos fault that consolidates the **pod-api-modify-body**, **pod-api-modify-header**, and **pod-api-status-code** faults.

- It overrides the api status code of service whose port is specified using the `TARGET_SERVICE_PORT` environment variable.
- It evaluates the application's resilience to lossy (or flaky) responses.
- It modifies the headers, body, and status code of both request and response for the APIs of the service specified by the `TARGET_SERVICE_PORT` environment variable.
- It assesses the application's resilience to modified or corrupted API requests and responses.

<Accordion color="green">
<summary>Use cases</summary>
This fault evaluates the application's resilience to lossy (or flaky) API responses.
This fault assesses the application's resilience to modified or corrupted API requests and responses.
</Accordion>

</FaultDetailsCard>

<FaultDetailsCard category="kubernetes" subCategory="pod">

### Pod API modify response custom
### Pod API Status Code

Pod API modify response custom is a Kubernetes pod-level chaos fault that consolidates the **pod-api-modify-body**, **pod-api-modify-header**, and **pod-api-status-code** faults.
Pod API status code is a Kubernetes pod-level chaos fault that change the API response status code and optionally api response body through path filtering.

- It modifies the headers, body, and status code of both request and response for the APIs of the service specified by the `TARGET_SERVICE_PORT` environment variable.
- It assesses the application's resilience to modified or corrupted API requests and responses.
- It overrides the api status code of service whose port is specified using the `TARGET_SERVICE_PORT` environment variable.
- It evaluates the application's resilience to lossy (or flaky) responses.

<Accordion color="green">
<summary>Use cases</summary>
This fault assesses the application's resilience to modified or corrupted API requests and responses.
This fault evaluates the application's resilience to lossy (or flaky) API responses.
</Accordion>

</FaultDetailsCard>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
---
id: pod-api-modify-response-custom
title: Pod API modify response custom
redirect_from:
- /docs/chaos-engineering/technical-reference/chaos-faults/kubernetes/pod/pod-api-modify-response-custom
- /docs/chaos-engineering/technical-reference/chaos-faults/kubernetes/pod-api-modify-response-custom
- /docs/chaos-engineering/chaos-faults/kubernetes/pod-api-modify-response-custom
title: Pod API Modify Response Custom
---

import CommonNote from './shared/common-note.md'
import ConfTLS from './shared/configure-tls.md'

The Pod API Modify Response Custom is a Kubernetes pod-level chaos fault that consolidates the **pod-api-modify-body**, **pod-api-modify-header**, and **pod-api-status-code** faults. It allows modifying one or more aspects of the API response simultaneously, including headers, status code, and response body.
Pod API Modify Response Custom is a Kubernetes pod-level chaos fault that consolidates the **pod-api-modify-body**, **pod-api-modify-header**, and **pod-api-status-code** faults. It allows modifying one or more aspects of the API response simultaneously, including headers, status code, and response body.

<CommonNote />


![Pod API Modify Response Custom](./static/images/pod-api-modify-response-custom.png)

## Use cases
Pod API modify response custom:
- This fault enables simultaneous modification of headers, status codes, and response bodies to simulate real-world failure scenarios, allowing for end-to-end testing of API behavior under different conditions.
- By modifying both response headers and body content, this fault can simulate unauthorized access attempts, expired authentication tokens, or altered security policies to evaluate the robustness of authentication and authorization mechanisms.
- This fault can help assess how changes in API responses impact client-side performance. For example, altering response sizes, introducing unexpected headers, or changing response codes can help identify performance bottlenecks and resilience gaps.
- Enables simultaneous modification of headers, status codes, and response bodies to simulate real-world failure scenarios, allowing end-to-end testing of API behavior under different conditions.
- Simulates unauthorized access attempts, expired authentication tokens, or altered security policies to evaluate the robustness of authentication and authorization mechanisms.
- Helps assess how changes in API responses impact client-side performance. For example, altering response sizes, introducing unexpected headers, or changing response codes can help identify performance bottlenecks and resilience gaps.
- In a distributed system, modifying API responses can help validate how dependent services react to unexpected responses, such as malformed data, missing fields, or incorrect status codes, ensuring better fault tolerance.

### Permissions required
### Permissions Required

Below is a sample Kubernetes role that defines the permissions required to execute the fault.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a794da6

Please sign in to comment.