Skip to content

Commit

Permalink
Merge pull request #9 from realshuting/add_threshold
Browse files Browse the repository at this point in the history
Automate load tests via GH actions
  • Loading branch information
realshuting authored Oct 27, 2023
2 parents 334dfea + 4acee8b commit 8935cd5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 159 deletions.
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*

0 comments on commit 8935cd5

Please sign in to comment.