From 535367c0bc3278a11cca35d34864c880b51f979a Mon Sep 17 00:00:00 2001 From: Chris Blum Date: Mon, 29 Jun 2020 14:09:00 +0200 Subject: [PATCH] Add stack labels to gosbench resources 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. --- k8s/gosbench.yaml | 6 +++++- k8s/gosbench_template.yaml.j2 | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/k8s/gosbench.yaml b/k8s/gosbench.yaml index 2466d3d..43999bb 100644 --- a/k8s/gosbench.yaml +++ b/k8s/gosbench.yaml @@ -100,6 +100,7 @@ metadata: name: gosbench-config labels: app: gosbench-monitoring + stack: gosbench --- apiVersion: batch/v1 kind: Job @@ -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 @@ -216,6 +217,7 @@ metadata: name: gosbench-server labels: app: gosbench-server + stack: gosbench spec: type: NodePort ports: @@ -230,6 +232,7 @@ metadata: name: gosbench-worker1 labels: app: gosbench-worker1 + stack: gosbench spec: type: NodePort ports: @@ -244,6 +247,7 @@ metadata: name: gosbench-worker2 labels: app: gosbench-worker2 + stack: gosbench spec: type: NodePort ports: diff --git a/k8s/gosbench_template.yaml.j2 b/k8s/gosbench_template.yaml.j2 index 0a892ab..46ebdd2 100644 --- a/k8s/gosbench_template.yaml.j2 +++ b/k8s/gosbench_template.yaml.j2 @@ -102,6 +102,7 @@ data: metadata: name: gosbench-config labels: + stack: gosbench app: gosbench-monitoring --- apiVersion: apps/v1 @@ -144,6 +145,7 @@ kind: Service metadata: name: gosbench-server labels: + stack: gosbench app: gosbench-server spec: type: NodePort @@ -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 @@ -196,6 +198,7 @@ kind: Service metadata: name: gosbench-worker{{ worker+1 }} labels: + stack: gosbench app: gosbench-worker{{ worker+1 }} spec: type: NodePort