Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate load tests via GH actions #9

Merged
merged 7 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ kind-deploy-kyverno: helm-add-repo helm-install-kyverno ## Deploy kyverno helm c

VUS ?= 10
ITERATIONS ?= 1000
SCRIPT ?= "kyverno-pss.js"
SCRIPT ?= kyverno-pss.js

.PHONY: kyverno-pss-block
kyverno-pss-block:
cd k6 \
cd k6 && \
./start.sh ./tests/${SCRIPT} ${VUS} ${ITERATIONS}

.PHONY: check-error
check-error:
@grep -q "level=error" "${SCRIPT}-${VUS}vu-${ITERATIONS}it-logs.txt" || (echo "Error found in the file."; exit 1)
@grep -q "level=error" "${SCRIPT}-${VUS}vu-${ITERATIONS}it-logs.txt" || (echo "Error found in the file."; exit 1)
56 changes: 0 additions & 56 deletions configs/kind/tracing.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions configs/kind/vap-v1alpha1.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions configs/kind/vap-v1beta1.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions k6/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ spec:
spec:
serviceAccountName: load-test
containers:
- image: grafana/k6:0.45.0
- image: grafana/k6:0.47.0
resources: {}
name: k6
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
capabilities:
Expand Down
34 changes: 17 additions & 17 deletions k6/pss-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,101 +5,101 @@ policyExclude:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
adding-capabilities-strict:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-host-namespaces:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-host-path:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-host-ports:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-host-process:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-privilege-escalation:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-privileged-containers:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-proc-mount:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
disallow-selinux:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
require-run-as-non-root-user:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
require-run-as-nonroot:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
restrict-apparmor-profiles:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
restrict-seccomp:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
restrict-seccomp-strict:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
restrict-sysctls:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*
restrict-volume-types:
any:
- resources:
namespaces:
- load-tests
- load-test
name: load-test*