From 7e2c7e4ad6a739774e4414576dc6e0d00d2a34a7 Mon Sep 17 00:00:00 2001
From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de>
Date: Tue, 1 Dec 2020 13:52:42 +0100
Subject: [PATCH] Remove the name prefix so that theodolity.py contacts the
 correct addresses

---
 .../theodolite-chart/templates/kafka-client.yaml  |  1 +
 .../theodolite-chart/templates/prometheus.yaml    |  2 +-
 .../templates/tests/test-connection.yaml          | 15 +++++++++++++++
 .../templates/zookeeper-client.yaml               |  1 +
 4 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 execution/helm/theodolite-chart/templates/tests/test-connection.yaml

diff --git a/execution/helm/theodolite-chart/templates/kafka-client.yaml b/execution/helm/theodolite-chart/templates/kafka-client.yaml
index 5f0ec7303..853cb7686 100644
--- a/execution/helm/theodolite-chart/templates/kafka-client.yaml
+++ b/execution/helm/theodolite-chart/templates/kafka-client.yaml
@@ -2,6 +2,7 @@
 apiVersion: v1
 kind: Pod
 metadata:
+  # name: {{ template "theodolite.fullname" . }}-kafka-client
   name: kafka-client
 spec:
   containers:
diff --git a/execution/helm/theodolite-chart/templates/prometheus.yaml b/execution/helm/theodolite-chart/templates/prometheus.yaml
index 0642ab6ac..a3060798a 100644
--- a/execution/helm/theodolite-chart/templates/prometheus.yaml
+++ b/execution/helm/theodolite-chart/templates/prometheus.yaml
@@ -2,7 +2,7 @@
 apiVersion: monitoring.coreos.com/v1
 kind: Prometheus
 metadata:
-  name: prometheus
+  name: {{ template "theodolite.fullname" . }}-prometheus
 spec:
   serviceAccountName: prometheus
   serviceMonitorSelector:
diff --git a/execution/helm/theodolite-chart/templates/tests/test-connection.yaml b/execution/helm/theodolite-chart/templates/tests/test-connection.yaml
new file mode 100644
index 000000000..7af87e989
--- /dev/null
+++ b/execution/helm/theodolite-chart/templates/tests/test-connection.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Pod
+metadata:
+  name: "{{ include "theodolite.fullname" . }}-test-prometheus"
+  labels:
+    {{- include "theodolite.labels" . | nindent 4 }}
+  annotations:
+    "helm.sh/hook": test-success
+spec:
+  containers:
+    - name: wget
+      image: busybox
+      command: ['wget']
+      args: ['http://prometheus-operated:9090']
+  restartPolicy: Never
diff --git a/execution/helm/theodolite-chart/templates/zookeeper-client.yaml b/execution/helm/theodolite-chart/templates/zookeeper-client.yaml
index 8d246aef6..a4d018bfe 100644
--- a/execution/helm/theodolite-chart/templates/zookeeper-client.yaml
+++ b/execution/helm/theodolite-chart/templates/zookeeper-client.yaml
@@ -2,6 +2,7 @@
 apiVersion: v1
 kind: Pod
 metadata:
+  # name: {{ template "theodolite.fullname" . }}-zookeeper-client
   name: zookeeper-client
 spec:
   containers:
-- 
GitLab