Added reponse body, content type and encoding fields; Removed trailing whitespaces for some files (#567)
Signed-off-by: avaakash <as86414@gmail.com> Signed-off-by: avaakash <as86414@gmail.com>
This commit is contained in:
committed by
GitHub
parent
86e3e1b239
commit
16ceadeea4
@@ -18,7 +18,7 @@ spec:
|
|||||||
# set chaos duration (in sec) as desired
|
# set chaos duration (in sec) as desired
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '60' # in seconds
|
value: '60' # in seconds
|
||||||
|
|
||||||
# provide the body string to overwrite the response body
|
# provide the body string to overwrite the response body
|
||||||
- name: RESPONSE_BODY
|
- name: RESPONSE_BODY
|
||||||
value: ''
|
value: ''
|
||||||
@@ -39,4 +39,3 @@ spec:
|
|||||||
## percentage of total pods to target
|
## percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
@@ -26,10 +26,10 @@ spec:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -38,7 +38,7 @@ spec:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
@@ -72,13 +72,23 @@ spec:
|
|||||||
|
|
||||||
# provide lib image
|
# provide lib image
|
||||||
- name: LIB_IMAGE
|
- name: LIB_IMAGE
|
||||||
value: 'litmuschaos/go-runner:latest'
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
# provide the body string to overwrite the response body
|
# provide the body string to overwrite the response body
|
||||||
# if no value is provided, response will be an empty body.
|
# if no value is provided, response will be an empty body.
|
||||||
- name: RESPONSE_BODY
|
- name: RESPONSE_BODY
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
|
# provide the encoding type for the response body
|
||||||
|
# currently supported value are gzip, deflate
|
||||||
|
# if empty no encoding will be applied
|
||||||
|
- name: CONTENT_ENCODING
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the content type for the response body
|
||||||
|
- name: CONTENT_TYPE
|
||||||
|
value: 'text/plain'
|
||||||
|
|
||||||
# port of the target service
|
# port of the target service
|
||||||
- name: TARGET_SERVICE_PORT
|
- name: TARGET_SERVICE_PORT
|
||||||
value: "80"
|
value: "80"
|
||||||
@@ -86,7 +96,7 @@ spec:
|
|||||||
# port on which the proxy will listen
|
# port on which the proxy will listen
|
||||||
- name: PROXY_PORT
|
- name: PROXY_PORT
|
||||||
value: "20000"
|
value: "20000"
|
||||||
|
|
||||||
# toxicity is the probability of the request to be affected
|
# toxicity is the probability of the request to be affected
|
||||||
# provide the percentage value in the range of 0-100
|
# 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
|
# 0 means no request will be affected and 100 means all request will be affected
|
||||||
@@ -133,9 +143,9 @@ spec:
|
|||||||
## supported values: serial, parallel
|
## supported values: serial, parallel
|
||||||
- name: SEQUENCE
|
- name: SEQUENCE
|
||||||
value: 'parallel'
|
value: 'parallel'
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
name: pod-http-modify-body
|
name: pod-http-modify-body
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/component: experiment-job
|
app.kubernetes.io/component: experiment-job
|
||||||
app.kubernetes.io/version: latest
|
app.kubernetes.io/version: latest
|
||||||
|
@@ -1,36 +1,36 @@
|
|||||||
apiVersion: litmuchaos.io/v1alpha1
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
kind: ChartServiceVersion
|
kind: ChartServiceVersion
|
||||||
metadata:
|
metadata:
|
||||||
name: pod-http-modify-body
|
name: pod-http-modify-body
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
annotations:
|
annotations:
|
||||||
categories: generic
|
categories: generic
|
||||||
spec:
|
spec:
|
||||||
displayName: pod-http-modify-body
|
displayName: pod-http-modify-body
|
||||||
categoryDescription: >
|
categoryDescription: >
|
||||||
Pod-http-modify-body contains chaos to disrupt http requests of kubernetes pods. This experiment can modify the body of the response from the service targetted.
|
Pod-http-modify-body contains chaos to disrupt http requests of kubernetes pods. This experiment can modify the body of the response from the service targetted.
|
||||||
- Causes modification of response body of the HTTP request.
|
- Causes modification of response body of the HTTP request.
|
||||||
- The application pod should be healthy once chaos is stopped. Service-requests should be served despite chaos.
|
- The application pod should be healthy once chaos is stopped. Service-requests should be served despite chaos.
|
||||||
keywords:
|
keywords:
|
||||||
- "pods"
|
- "pods"
|
||||||
- "kubernetes"
|
- "kubernetes"
|
||||||
- "generic"
|
- "generic"
|
||||||
- "exec"
|
- "exec"
|
||||||
- "http"
|
- "http"
|
||||||
- "response body"
|
- "response body"
|
||||||
platforms:
|
platforms:
|
||||||
- "Minikube"
|
- "Minikube"
|
||||||
maturity: alpha
|
maturity: alpha
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Akash Shrivastava
|
- name: Akash Shrivastava
|
||||||
email: akash.shrivastava@harness.io
|
email: akash.shrivastava@harness.io
|
||||||
minKubeVersion: 1.12.0
|
minKubeVersion: 1.12.0
|
||||||
provider:
|
provider:
|
||||||
name: Harness
|
name: Harness
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/component: chartserviceversion
|
app.kubernetes.io/component: chartserviceversion
|
||||||
app.kubernetes.io/version: latest
|
app.kubernetes.io/version: latest
|
||||||
links:
|
links:
|
||||||
- name: Source Code
|
- name: Source Code
|
||||||
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/pod-http-modify-body
|
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/pod-http-modify-body
|
||||||
- name: Documentation
|
- name: Documentation
|
||||||
|
@@ -28,10 +28,10 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -40,7 +40,7 @@ rules:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
|
@@ -28,10 +28,10 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -40,7 +40,7 @@ rules:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
|
@@ -22,7 +22,7 @@ spec:
|
|||||||
# set chaos interval (in sec) as desired
|
# set chaos interval (in sec) as desired
|
||||||
- name: CHAOS_INTERVAL
|
- name: CHAOS_INTERVAL
|
||||||
value: '10'
|
value: '10'
|
||||||
|
|
||||||
# modified status code for the http response
|
# modified status code for the http response
|
||||||
# if no value is provided, a random status code from the supported code list will selected
|
# 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 an invalid status code is provided, the experiment will fail
|
||||||
@@ -33,7 +33,10 @@ spec:
|
|||||||
# whether to modify the body as per the status code provided
|
# whether to modify the body as per the status code provided
|
||||||
- name: "MODIFY_RESPONSE_BODY"
|
- name: "MODIFY_RESPONSE_BODY"
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|
||||||
|
# provide the body string to overwrite the response body. This will be used only if MODIFY_RESPONSE_BODY is set to true
|
||||||
|
- name: RESPONSE_BODY
|
||||||
|
value: ''
|
||||||
# port of the target service
|
# port of the target service
|
||||||
- name: TARGET_SERVICE_PORT
|
- name: TARGET_SERVICE_PORT
|
||||||
value: "80"
|
value: "80"
|
||||||
@@ -51,4 +54,3 @@ spec:
|
|||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
|
|
@@ -26,10 +26,10 @@ spec:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -38,7 +38,7 @@ spec:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
@@ -72,7 +72,7 @@ spec:
|
|||||||
|
|
||||||
# provide lib image
|
# provide lib image
|
||||||
- name: LIB_IMAGE
|
- name: LIB_IMAGE
|
||||||
value: 'litmuschaos/go-runner:latest'
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
# modified status code for the http response
|
# modified status code for the http response
|
||||||
# if no value is provided, a random status code from the supported code list will selected
|
# if no value is provided, a random status code from the supported code list will selected
|
||||||
@@ -86,6 +86,20 @@ spec:
|
|||||||
- name: "MODIFY_RESPONSE_BODY"
|
- name: "MODIFY_RESPONSE_BODY"
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|
||||||
|
# provide the body string to overwrite the response body. This will be used only if MODIFY_RESPONSE_BODY is set to true
|
||||||
|
- name: RESPONSE_BODY
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the encoding type for the response body
|
||||||
|
# currently supported value are gzip, deflate
|
||||||
|
# if empty no encoding will be applied
|
||||||
|
- name: CONTENT_ENCODING
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the content type for the response body
|
||||||
|
- name: CONTENT_TYPE
|
||||||
|
value: 'text/plain'
|
||||||
|
|
||||||
# port of the target service
|
# port of the target service
|
||||||
- name: TARGET_SERVICE_PORT
|
- name: TARGET_SERVICE_PORT
|
||||||
value: "80"
|
value: "80"
|
||||||
@@ -99,7 +113,7 @@ spec:
|
|||||||
# 0 means no request will be affected and 100 means all request will be affected
|
# 0 means no request will be affected and 100 means all request will be affected
|
||||||
- name: TOXICITY
|
- name: TOXICITY
|
||||||
value: "100"
|
value: "100"
|
||||||
|
|
||||||
# network interface on which the proxy will listen
|
# network interface on which the proxy will listen
|
||||||
- name: NETWORK_INTERFACE
|
- name: NETWORK_INTERFACE
|
||||||
value: "eth0"
|
value: "eth0"
|
||||||
@@ -140,9 +154,9 @@ spec:
|
|||||||
## supported values: serial, parallel
|
## supported values: serial, parallel
|
||||||
- name: SEQUENCE
|
- name: SEQUENCE
|
||||||
value: 'parallel'
|
value: 'parallel'
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
name: pod-http-status-code
|
name: pod-http-status-code
|
||||||
app.kubernetes.io/part-of: litmus
|
app.kubernetes.io/part-of: litmus
|
||||||
app.kubernetes.io/component: experiment-job
|
app.kubernetes.io/component: experiment-job
|
||||||
app.kubernetes.io/version: latest
|
app.kubernetes.io/version: latest
|
||||||
|
@@ -1,37 +1,37 @@
|
|||||||
apiVersion: litmuchaos.io/v1alpha1
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
kind: ChartServiceVersion
|
kind: ChartServiceVersion
|
||||||
metadata:
|
metadata:
|
||||||
name: pod-http-status-code
|
name: pod-http-status-code
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
annotations:
|
annotations:
|
||||||
categories: generic
|
categories: generic
|
||||||
spec:
|
spec:
|
||||||
displayName: pod-http-status-code
|
displayName: pod-http-status-code
|
||||||
categoryDescription: >
|
categoryDescription: >
|
||||||
pod-http-status-code contains chaos to disrupt http requests of kubernetes pods. This experiment can modify the status code of the response on the service targetted.
|
pod-http-status-code contains chaos to disrupt http requests of kubernetes pods. This experiment can modify the status code of the response on the service targetted.
|
||||||
- Causes modification of status code of the HTTP request.
|
- Causes modification of status code of the HTTP request.
|
||||||
- The application pod should be healthy once chaos is stopped. Service-requests should be served despite chaos.
|
- The application pod should be healthy once chaos is stopped. Service-requests should be served despite chaos.
|
||||||
keywords:
|
keywords:
|
||||||
- "pods"
|
- "pods"
|
||||||
- "kubernetes"
|
- "kubernetes"
|
||||||
- "generic"
|
- "generic"
|
||||||
- "exec"
|
- "exec"
|
||||||
- "http"
|
- "http"
|
||||||
- "status code"
|
- "status code"
|
||||||
- "response code"
|
- "response code"
|
||||||
platforms:
|
platforms:
|
||||||
- "Minikube"
|
- "Minikube"
|
||||||
maturity: alpha
|
maturity: alpha
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Akash Shrivastava
|
- name: Akash Shrivastava
|
||||||
email: akash.shrivastava@harness.io
|
email: akash.shrivastava@harness.io
|
||||||
minKubeVersion: 1.12.0
|
minKubeVersion: 1.12.0
|
||||||
provider:
|
provider:
|
||||||
name: Harness
|
name: Harness
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/component: chartserviceversion
|
app.kubernetes.io/component: chartserviceversion
|
||||||
app.kubernetes.io/version: latest
|
app.kubernetes.io/version: latest
|
||||||
links:
|
links:
|
||||||
- name: Source Code
|
- name: Source Code
|
||||||
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/pod-http-status-code
|
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/pod-http-status-code
|
||||||
- name: Documentation
|
- name: Documentation
|
||||||
|
@@ -29,10 +29,10 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -41,7 +41,7 @@ rules:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
|
@@ -28,10 +28,10 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["configmaps"]
|
resources: ["configmaps"]
|
||||||
verbs: ["get","list",]
|
verbs: ["get","list",]
|
||||||
# Track and get the runner, experiment, and helper pods log
|
# Track and get the runner, experiment, and helper pods log
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get","list","watch"]
|
verbs: ["get","list","watch"]
|
||||||
# for creating and managing to execute comands inside target container
|
# for creating and managing to execute comands inside target container
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/exec"]
|
resources: ["pods/exec"]
|
||||||
@@ -40,7 +40,7 @@ rules:
|
|||||||
- apiGroups: ["apps"]
|
- apiGroups: ["apps"]
|
||||||
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
- apiGroups: ["apps.openshift.io"]
|
- apiGroups: ["apps.openshift.io"]
|
||||||
resources: ["deploymentconfigs"]
|
resources: ["deploymentconfigs"]
|
||||||
verbs: ["list","get"]
|
verbs: ["list","get"]
|
||||||
|
Reference in New Issue
Block a user