.. | ||
loadtest.js | ||
README.md | ||
smoketest.js |
Performance testing ingress-nginx-controller in GithubAction-CI
This README will evolve as the development of testing occurs.
INFORMATION
1. No CPU/Memory for stress
-
Github-Actions job runner is a 2core 7Gig VM so that limits what/how we test https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- Need to eventually get our own beefy runner, with enough cpu/memory to handle stress level load
2. Scale is work-in-progress
- We are grateful to have got a free account on K6.io, as part of their OSS Program. But it is limited to 600 tests per year.
3. No Testplans
- Testplan discussion and coding is needed for more practical real-world testing reports
DESCRIPTION
What
- An issue was created for performance tests, for the ingress-nginx-controller builds, https://github.com/kubernetes/ingress-nginx/issues/8033 .
How
-
A step by step guide to using https://k6.io with GithubActions is here https://k6.io/blog/load-testing-using-github-actions/
-
The link above contains sample code
-
Copy sample test code from website and edit to taste
-
The CI launches a ubuntu environment and uses
make dev-env
to create a kind cluster. The popular https://httpbin.org api docker image is used to create a workload -
We don't want the test to block CI so this syntax from Github-Actions creates a button to run the test
-
The button looks like this (the
Run Workflow
dropdown at bottom right of screenshot)
-
fqdn
-
Obtained a freenom domain
ingress-nginx-controller.ga
-
The test uses a fqdn
test.ingress-nginx-controller.ga
-
The K6 api has configuration options for dns resolution of (above mentioned fqdn) to localhost/loopback/127.0.0.1 (
make dev-env
cluster) -
Will need to discuss and decide on fqdn, as it relates to tls secret
-
tls
-
Procured a letsencrypt wildcard certificate for
*.ingress-nginx-controller.ga
-
base64 encoded hash of the cert + key is stored in the
Github Project Settings Secrets
as a variable -
The
GithubActions secrets
variables are decoded in the CI to create the TLS secret
-
Visualization
-
Plan is to run tests locally on a kind cluster, in the CI pipeline, but push results to K6-cloud
-
Pushing and visualization on K6 cloud is as simple as executing
k6 run -o cloud test.js
-
Currently there is a personal account in trial period (50 tests or 1 year limit) bing used
-
Pushing test-results from K6 tests on laptop, to K6-cloud personal trial account on K6-Cloud, to see what the graphs look like
-
The cli result looks like this
-
-
Before merging the PR, the testing is being done on personal Github project with exact same code as this PR here https://github.com/longwuyuan/k6-loadtest-example/runs/6545706269?check_suite_focus=true