-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from kubeshop/argocd-testworkflow
Add ArgoCD example
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# K6 Test Workflow with ArgoCD | ||
|
||
This folder contains a K6 test workflow file, `basic-k6.yaml` which automates running K6 load tests in your environment. We will use this repo as part of and ArgoCD application. | ||
|
||
## Folder Contents | ||
|
||
- `basic-k6.yaml`: The K6 test workflow file for aload testing. | ||
|
||
## Prerequisites | ||
|
||
Before setting up the workflow, ensure you have the following: | ||
|
||
- ArgoCD installed and configured in your Kubernetes cluster. | ||
- Testkube installed and configured in your Kubernetes cluster. | ||
|
||
## Steps to Configure | ||
|
||
Follow these steps to set up and configure the K6 test workflow with ArgoCD: | ||
|
||
1. Clone this repository to your local machine. | ||
2. Create a new ArgoCD application for the K6 test workflow - *this allows ArgoCD to track the test.yaml file and deploy the workflow to your Kubernetes cluster*. | ||
3. After the application is created, sync it with your repository to deploy the workflow. | ||
4. Monitor the deployment using ArgoCD’s web UI or CLI. | ||
5. Once the workflow is deployed, you can trigger the test workflow using testkube cli or dashboard. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
kind: TestWorkflow | ||
apiVersion: testworkflows.testkube.io/v1 | ||
metadata: | ||
name: basic-k6-workflow | ||
namespace: testkube | ||
labels: | ||
docs: example | ||
spec: | ||
content: | ||
files: | ||
- path: /data/example.js | ||
content: |- | ||
import http from 'k6/http'; | ||
import { sleep } from 'k6'; | ||
export default function () { | ||
http.get('https://test.k6.io'); | ||
sleep(1); | ||
}; | ||
steps: | ||
- name: Run Tests | ||
workingDir: /data | ||
run: | ||
image: grafana/k6:0.49.0 | ||
env: | ||
- name: K6_WEB_DASHBOARD | ||
value: "true" | ||
- name: K6_WEB_DASHBOARD_EXPORT | ||
value: k6-test-report.html | ||
args: | ||
- run | ||
- example.js | ||
artifacts: | ||
paths: | ||
- k6-test-report.html | ||
status: {} |