diff --git a/.github/workflows/trigger-loadtest.yml b/.github/workflows/trigger-loadtest.yml index c4ff338..e95cf91 100644 --- a/.github/workflows/trigger-loadtest.yml +++ b/.github/workflows/trigger-loadtest.yml @@ -8,7 +8,7 @@ on: description: "Branch to take test code and helm/cron setup from" required: false type: string - default: main + default: "SPSH-1390" branch_img: description: "Branch to take Dockerfile/img from" required: false @@ -23,7 +23,7 @@ on: description: "sets CONFIG env var used as k6 input" required: false type: string - default: "debug" + default: "plateau" max_vus: description: "sets the maximum number of virtual users" required: false @@ -33,12 +33,12 @@ on: description: "name of test scenario defined in values.yaml" type: string required: true - default: dev-scenario + default: prod-scenario execute: description: "execute cronjob scenario after install" type: boolean required: true - default: false + default: true jobs: install_loadtest: diff --git a/charts/schulportal-load-tests/values.yaml b/charts/schulportal-load-tests/values.yaml index d1b8949..ab97754 100644 --- a/charts/schulportal-load-tests/values.yaml +++ b/charts/schulportal-load-tests/values.yaml @@ -16,7 +16,6 @@ cronjobs: serviceName: staging-scenario spsh_base: "https://spsh.staging.spsh.dbildungsplattform.de" kc_base: "https://keycloak.staging.spsh.dbildungsplattform.de" - # prod-scenario: - # serviceName: prod-scenario - # image: ghcr.io/dbildungsplattform/schulportal-load-tests:latest - # environment: spsh.dbildungsplattform.de + prod-scenario: + serviceName: prod-scenario + spsh_base: "https://spsh.dbildungsplattform.de" diff --git a/loadtest/util/config.ts b/loadtest/util/config.ts index bae02b0..086d04f 100644 --- a/loadtest/util/config.ts +++ b/loadtest/util/config.ts @@ -5,6 +5,7 @@ export enum CONFIG { SPIKE = "spike", STRESS = "stress", BREAKPOINT = "breakpoint", + PLATEAU = "plateau", DEBUG = "debug", } export function getConfig(): CONFIG { @@ -48,6 +49,17 @@ export function getDefaultOptions() { http_req_duration: [{ threshold: "p(95)<5000", abortOnFail: true }], }, }; + case CONFIG.PLATEAU: + return { + stages: [ + // ramp up + { duration: "1m", target: maxVUs }, + // plateau + { duration: "5m", target: maxVUs }, + // ramp down + { duration: "1m", target: 0 }, + ], + }; case CONFIG.DEBUG: return { stages: [{ duration: "1s", target: maxVUs }],