Skip to content

Commit

Permalink
ci: fix nightly chaos tests (#119)
Browse files Browse the repository at this point in the history
* ci: fix nightly chaos tests

* chore(semantic-release): fix version update in Dockerfile and values

* increase p99 slo theshold
  • Loading branch information
chgl authored Dec 9, 2023
1 parent 6099c10 commit be90e7b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 10 deletions.
18 changes: 17 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,30 @@
"hasChanged": true
}
]
},
{
"files": ["tests/chaos/fhir-pseudonymizer-values.yaml"],
"from": "tag: .*",
"to": "tag: v${nextRelease.version}",
"results": [
{
"file": "tests/chaos/fhir-pseudonymizer-values.yaml",
"hasChanged": true
}
]
}
]
}
],
[
"@semantic-release/git",
{
"assets": ["README.md", "compose/compose.yaml"]
"assets": [
"README.md",
"compose/compose.yaml",
"Dockerfile",
"tests/chaos/fhir-pseudonymizer-values.yaml"
]
}
]
]
Expand Down
4 changes: 3 additions & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: "3"
tasks:
build-stress-test-image:
desc: build the container image used for stress testing
vars:
BUILDKIT_PROGRESS: plain
cmds:
- docker build -t ghcr.io/miracum/fhir-pseudonymizer/stress-test:v1 --target=stress-test --iidfile=./stress-test-iid.txt .
sources:
Expand All @@ -14,7 +16,7 @@ tasks:
desc: download and install the argo workflows cli
dir: tests/chaos
cmds:
- curl -sL -o - https://github.com/argoproj/argo-workflows/releases/download/v3.4.9/argo-linux-amd64.gz | gunzip > argo
- curl -sL -o - https://github.com/argoproj/argo-workflows/releases/download/v3.5.2/argo-linux-amd64.gz | gunzip > argo
- chmod +x ./argo
- ./argo version
status:
Expand Down
7 changes: 1 addition & 6 deletions src/FhirPseudonymizer.StressTests/StressTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,7 @@ double failPercentageThreshold
.WithWarmUpDuration(TimeSpan.FromSeconds(10))
.WithLoadSimulations(
Simulation.RampingConstant(copies: 10, during: TimeSpan.FromMinutes(5)),
Simulation.KeepConstant(copies: 100, during: TimeSpan.FromMinutes(5)),
Simulation.RampingInject(
rate: 10,
TimeSpan.FromMinutes(1),
during: TimeSpan.FromMinutes(10)
)
Simulation.KeepConstant(copies: 100, during: TimeSpan.FromMinutes(10))
);

var stats = NBomberRunner
Expand Down
15 changes: 14 additions & 1 deletion tests/chaos/chaos-mesh-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
rules:
- apiGroups: [""]
resources: ["pods", "namespaces"]
verbs: ["get", "watch", "list"]
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
- apiGroups: ["chaos-mesh.org"]
resources: ["*"]
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
Expand All @@ -34,6 +34,19 @@ subjects:
name: chaos-mesh-cluster-manager
namespace: fhir-pseudonymizer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: role-chaos-mesh-cluster-manager
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: bind-chaos-mesh-cluster-manager-to-argo-workflow
subjects:
- kind: ServiceAccount
name: chaos-mesh-cluster-manager
namespace: fhir-pseudonymizer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-workflows-admin
3 changes: 3 additions & 0 deletions tests/chaos/fhir-pseudonymizer-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
replicaCount: 3

image:
tag: v2.21.3

anonymizationConfig: |
---
fhirVersion: R4
Expand Down
2 changes: 1 addition & 1 deletion tests/iter8/experiment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ stringData:
- metric: http/latency-mean
limit: 25
- metric: http/latency-p99.0
limit: 75
limit: 85
---
# Source: iter8/templates/k8s.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit be90e7b

Please sign in to comment.