Skip to content

Commit

Permalink
Add stack labels to gosbench resources
Browse files Browse the repository at this point in the history
This way we can select and delete everything with
oc get all -l stack=gosbench
oc delete all -l stack=gosbench

Also disabled debug mode in workers since it polluted the log file...
If anything goes wrong, we have the error logs.
  • Loading branch information
mulbc committed Jun 29, 2020
1 parent d944a2c commit 535367c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion k8s/gosbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ metadata:
name: gosbench-config
labels:
app: gosbench-monitoring
stack: gosbench
---
apiVersion: batch/v1
kind: Job
Expand Down Expand Up @@ -170,7 +171,7 @@ spec:
- name: gosbench-worker
image: quay.io/mulbc/gosbench-worker:latest
imagePullPolicy: Always
command: ['./main', '-d', '-s', 'gosbench-server:2000']
command: ['./main', '-s', 'gosbench-server:2000']
ports:
- containerPort: 8888
restartPolicy: Never
Expand Down Expand Up @@ -216,6 +217,7 @@ metadata:
name: gosbench-server
labels:
app: gosbench-server
stack: gosbench
spec:
type: NodePort
ports:
Expand All @@ -230,6 +232,7 @@ metadata:
name: gosbench-worker1
labels:
app: gosbench-worker1
stack: gosbench
spec:
type: NodePort
ports:
Expand All @@ -244,6 +247,7 @@ metadata:
name: gosbench-worker2
labels:
app: gosbench-worker2
stack: gosbench
spec:
type: NodePort
ports:
Expand Down
5 changes: 4 additions & 1 deletion k8s/gosbench_template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ data:
metadata:
name: gosbench-config
labels:
stack: gosbench
app: gosbench-monitoring
---
apiVersion: apps/v1
Expand Down Expand Up @@ -144,6 +145,7 @@ kind: Service
metadata:
name: gosbench-server
labels:
stack: gosbench
app: gosbench-server
spec:
type: NodePort
Expand Down Expand Up @@ -186,7 +188,7 @@ spec:
- name: gosbench-worker
image: quay.io/mulbc/gosbench-worker:latest
imagePullPolicy: Always
command: ['./main', '-d', '-s', 'gosbench-server:2000']
command: ['./main', '-s', 'gosbench-server:2000']
ports:
- containerPort: 8888
restartPolicy: Never
Expand All @@ -196,6 +198,7 @@ kind: Service
metadata:
name: gosbench-worker{{ worker+1 }}
labels:
stack: gosbench
app: gosbench-worker{{ worker+1 }}
spec:
type: NodePort
Expand Down

0 comments on commit 535367c

Please sign in to comment.