Created
October 27, 2020 17:59
-
-
Save kleimkuhler/53a88b32f342934f02f974de1fcf8327 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: fast-1 | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: terminus | |
template: | |
metadata: | |
labels: | |
app: terminus | |
spec: | |
containers: | |
- name: fast | |
image: buoyantio/bb:v0.0.6 | |
args: | |
- terminus | |
- "--h1-server-port=8080" | |
# Uncomment this when testing with the ServiceProfile | |
# - "--percent-failure=50" | |
- "--response-text=fast-1" | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: fast-2 | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: terminus | |
template: | |
metadata: | |
labels: | |
app: terminus | |
spec: | |
containers: | |
- name: fast | |
image: buoyantio/bb:v0.0.6 | |
args: | |
- terminus | |
- "--h1-server-port=8080" | |
- "--response-text=fast-2" | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: slow | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: terminus | |
template: | |
metadata: | |
labels: | |
app: terminus | |
spec: | |
containers: | |
- name: slow | |
image: buoyantio/bb:v0.0.6 | |
args: | |
- terminus | |
- "--h1-server-port=8080" | |
- "--sleep-in-millis=50" | |
- "--response-text=slow" | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: terminus-svc | |
labels: | |
app: terminus-svc | |
spec: | |
selector: | |
app: terminus | |
ports: | |
- name: http | |
port: 8080 | |
targetPort: 8080 | |
# --- | |
# apiVersion: linkerd.io/v1alpha2 | |
# kind: ServiceProfile | |
# metadata: | |
# creationTimestamp: null | |
# name: test-svc.default.svc.cluster.local | |
# namespace: default | |
# spec: | |
# routes: | |
# - name: test | |
# condition: | |
# method: "*" | |
# pathRegex: "*" | |
# isRetryable: true | |
--- | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: slow-cooker | |
spec: | |
template: | |
metadata: | |
labels: | |
app: slow-cooker | |
spec: | |
containers: | |
- name: slow-cooker | |
image: buoyantio/slow_cooker:1.3.0 | |
command: | |
- "/bin/sh" | |
args: | |
- "-c" | |
- | | |
sleep 15 # wait for pods to start | |
/slow_cooker/slow_cooker -qps 500 -metric-addr 0.0.0.0:9999 http://terminus-svc:8080 | |
ports: | |
- containerPort: 9999 | |
restartPolicy: OnFailure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment