From e5317cca25f03cb300778f0f4a41b977b45747b6 Mon Sep 17 00:00:00 2001 From: namkyu1999 Date: Fri, 16 Feb 2024 16:16:05 +0900 Subject: [PATCH] fix: fixed scope Signed-off-by: namkyu1999 --- faults/load/experiments.yaml | 14 ++++++++++++-- faults/load/k6-loadgen/engine.yaml | 18 +++++++++++++++--- faults/load/k6-loadgen/fault.yaml | 14 ++++++++++++-- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/faults/load/experiments.yaml b/faults/load/experiments.yaml index 124e49212..f19b6a9ba 100644 --- a/faults/load/experiments.yaml +++ b/faults/load/experiments.yaml @@ -13,7 +13,7 @@ metadata: app.kubernetes.io/version: ci spec: definition: - scope: Cluster + scope: Namespaced permissions: # Create and monitor the experiment & helper pods - apiGroups: [""] @@ -60,15 +60,17 @@ spec: command: - /bin/bash env: + # set chaos duration (in sec) as desired - name: TOTAL_CHAOS_DURATION value: "30" + # Interval between chaos injection in sec - name: CHAOS_INTERVAL value: "30" # Period to wait before and after injection of chaos in sec - name: RAMP_TIME - value: "" + value: "0" # Provide the secret name of the JS script - name: SCRIPT_SECRET_NAME @@ -78,6 +80,14 @@ spec: - name: SCRIPT_SECRET_KEY value: "script.js" + # Provide the image name of the helper pod + - name: LIB_IMAGE + value: "ghcr.io/grafana/k6-operator:latest-runner" + + # Provide the image pull policy of the helper pod + - name: LIBImagePullPolicy + value: "Always" + labels: name: k6-loadgen app.kubernetes.io/part-of: litmus diff --git a/faults/load/k6-loadgen/engine.yaml b/faults/load/k6-loadgen/engine.yaml index 43f83d6dd..ff1e7ce35 100644 --- a/faults/load/k6-loadgen/engine.yaml +++ b/faults/load/k6-loadgen/engine.yaml @@ -14,11 +14,15 @@ spec: env: # set chaos duration (in sec) as desired - name: TOTAL_CHAOS_DURATION - value: '30' + value: "30" - # set chaos intreval (in sec) as desired + # Interval between chaos injection in sec - name: CHAOS_INTERVAL - value: '30' + value: "30" + + # Period to wait before and after injection of chaos in sec + - name: RAMP_TIME + value: "0" # Provide the secret name of the JS script - name: SCRIPT_SECRET_NAME @@ -27,3 +31,11 @@ spec: # Provide the secret key of the JS script - name: SCRIPT_SECRET_KEY value: "script.js" + + # Provide the image name of the helper pod + - name: LIB_IMAGE + value: "ghcr.io/grafana/k6-operator:latest-runner" + + # Provide the image pull policy of the helper pod + - name: LIBImagePullPolicy + value: "Always" diff --git a/faults/load/k6-loadgen/fault.yaml b/faults/load/k6-loadgen/fault.yaml index 17d1688fb..1867c8f21 100644 --- a/faults/load/k6-loadgen/fault.yaml +++ b/faults/load/k6-loadgen/fault.yaml @@ -13,7 +13,7 @@ metadata: app.kubernetes.io/version: ci spec: definition: - scope: Cluster + scope: Namespaced permissions: # Create and monitor the experiment & helper pods - apiGroups: [""] @@ -60,15 +60,17 @@ spec: command: - /bin/bash env: + # set chaos duration (in sec) as desired - name: TOTAL_CHAOS_DURATION value: "30" + # Interval between chaos injection in sec - name: CHAOS_INTERVAL value: "30" # Period to wait before and after injection of chaos in sec - name: RAMP_TIME - value: "" + value: "0" # Provide the secret name of the JS script - name: SCRIPT_SECRET_NAME @@ -78,6 +80,14 @@ spec: - name: SCRIPT_SECRET_KEY value: "script.js" + # Provide the image name of the helper pod + - name: LIB_IMAGE + value: "ghcr.io/grafana/k6-operator:latest-runner" + + # Provide the image pull policy of the helper pod + - name: LIBImagePullPolicy + value: "Always" + labels: name: k6-loadgen app.kubernetes.io/part-of: litmus