Skip to content

Commit

Permalink
Move K8s gosbench workers to Jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mulbc committed Mar 4, 2020
1 parent dbc2d3d commit 9b6faee
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions k8s/gosbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,47 +68,45 @@ metadata:
labels:
app: gosbench-monitoring
---
apiVersion: extensions/v1beta1
kind: Deployment
apiVersion: batch/v1
kind: Job
metadata:
name: worker1
labels:
app: gosbench-worker1
spec:
replicas: 1
template:
hostname: worker1
metadata:
labels:
app: gosbench
spec:
containers:
- name: prometheus
- name: worker
image: quay.io/mulbc/goroom-worker
command: ['./main', '-s', 'gosbench-server:2000']
ports:
- containerPort: 8888
restartPolicy: Never
---
apiVersion: extensions/v1beta1
kind: Deployment
apiVersion: batch/v1
kind: Job
metadata:
name: worker2
labels:
app: gosbench-worker2
spec:
replicas: 1
template:
hostname: worker2
metadata:
labels:
app: gosbench
spec:
containers:
- name: prometheus
- name: worker
image: quay.io/mulbc/goroom-worker
command: ['./main', '-s', 'gosbench-server:2000']
ports:
- containerPort: 8888
restartPolicy: Never
---
apiVersion: extensions/v1beta1
kind: Deployment
Expand All @@ -124,7 +122,7 @@ spec:
app: gosbench
spec:
containers:
- name: prometheus
- name: server
image: quay.io/mulbc/goroom-server
command: ['./main', '-c', '/app/config/config.yml']
ports:
Expand Down Expand Up @@ -160,10 +158,10 @@ metadata:
spec:
type: NodePort
ports:
- port: 2000
targetPort: 2000
- port: 8888
targetPort: 8888
selector:
app: gosbench-worker2
job-name: worker1
---
apiVersion: v1
kind: Service
Expand All @@ -174,8 +172,8 @@ metadata:
spec:
type: NodePort
ports:
- port: 2000
targetPort: 2000
- port: 8888
targetPort: 8888
selector:
app: gosbench-worker2
job-name: worker2
...

0 comments on commit 9b6faee

Please sign in to comment.