Skip to content
Open
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: 6 additions & 0 deletions k8s/apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This directory contains Kubernetes manifests for auxiliary applications that sup

## Files

- `httpbin.yaml` - Go implementation of httpbin.org for testing HTTP requests and responses
- Based on the [go-httpbin](https://github.com/mccutchen/go-httpbin) project
- Includes readiness and liveness probes to ensure the application is healthy
- Provides various endpoints for testing different HTTP features (/get, /post, /status, etc.)
- Runs on port 8080

- `k6.yaml` - k6 load testing tool configuration for performance testing
- References the external script file `test-script.js`
- When applying this manifest, use: `kubectl create configmap k6-test-script --from-file=test-script.js=./k8s/apps/test-script.js -n tools`
Expand Down
60 changes: 60 additions & 0 deletions k8s/apps/httpbin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
namespace: tools
labels:
app: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
template:
metadata:
labels:
app: httpbin
spec:
containers:
- name: httpbin
image: mccutchen/go-httpbin:2.18.3
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /get
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /get
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 3
resources:
limits:
memory: "128Mi"
cpu: "100m"
requests:
memory: "64Mi"
cpu: "50m"
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: tools
spec:
selector:
app: httpbin
ports:
- port: 8080
targetPort: 8080
type: ClusterIP
2 changes: 2 additions & 0 deletions k8s/tyk-stack-ingress/run-tyk-cp-dp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ done
log "Creating $TOOLS_NAMESPACE namespace"
kubectl create namespace "$TOOLS_NAMESPACE" 2> /dev/null || true

log "Installing httpbin app in $TOOLS_NAMESPACE namespace"
kubectl apply -f ../apps/httpbin.yaml

log "Installing k6 load testing resources in $TOOLS_NAMESPACE namespace"
kubectl create configmap k6-test-script --from-file=test-script.js=../apps/test-script.js \
Expand Down
Loading