Skip to content

Commit

Permalink
feat(deployment): traffic gen as k8s pod
Browse files Browse the repository at this point in the history
  • Loading branch information
tkurzydym committed May 13, 2024
1 parent ee962a2 commit db043c5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions deployment/base/observability/create-traffic-pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: v1
kind: Pod
metadata:
name: traffic-generator
namespace: production
spec:
containers:
- name: traffic-generator
image: curlimages/curl:8.7.1
command:
- "/bin/sh"
- "-c"
- >
while true; do
curl -sS --location --request PUT 'customer-service:8080/customers/0815/delivery-address' \
--header 'Content-Type: application/json' \
--data-raw '{
"city": "26121 Oldenburg (Oldenburg)",
"recipient": "Max Mustermann",
"street": {
"name": "Poststraße",
"number": "1"
}
}'
echo 'PUT request for delivery address finished.'
sleep 0.5
done
3 changes: 2 additions & 1 deletion deployment/base/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ resources:
- dashboard.yaml
- jaeger.yml
- opentelemetry-collector.yml
- podmonitor.yaml
- podmonitor.yaml
- create-traffic-pod.yml

0 comments on commit db043c5

Please sign in to comment.