From e610148a6ed72a3e9d5a1d693ef374d0e1928a4f Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Wed, 31 Mar 2021 21:12:40 +0200
Subject: [PATCH] Fix helm chart

---
 .../templates/theodolite/benchmarkCRD.yaml    |  2 +-
 .../templates/theodolite/executionCRD.yaml    |  2 +-
 .../templates/theodolite/role-binding.yaml    |  2 +-
 execution/helm/templates/theodolite/role.yaml |  2 +-
 .../templates/theodolite/serviceaccount.yaml  |  2 +-
 .../theodolite/thedolite-operator.yaml        |  8 +++----
 execution/helm/values.yaml                    | 23 +++++++++----------
 7 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/execution/helm/templates/theodolite/benchmarkCRD.yaml b/execution/helm/templates/theodolite/benchmarkCRD.yaml
index 51881dfd6..9d7468b49 100644
--- a/execution/helm/templates/theodolite/benchmarkCRD.yaml
+++ b/execution/helm/templates/theodolite/benchmarkCRD.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.theodolite.benchmarkCRD.create -}}
+{{- if .Values.benchmarkCRD.create -}}
 apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
diff --git a/execution/helm/templates/theodolite/executionCRD.yaml b/execution/helm/templates/theodolite/executionCRD.yaml
index 66e9a940e..73b58397b 100644
--- a/execution/helm/templates/theodolite/executionCRD.yaml
+++ b/execution/helm/templates/theodolite/executionCRD.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.theodolite.executionCRD.create -}}
+{{- if .Values.executionCRD.create -}}
 apiVersion: apiextensions.k8s.io/v1beta1
 kind: CustomResourceDefinition
 metadata:
diff --git a/execution/helm/templates/theodolite/role-binding.yaml b/execution/helm/templates/theodolite/role-binding.yaml
index 5a4987146..93d8c34e7 100644
--- a/execution/helm/templates/theodolite/role-binding.yaml
+++ b/execution/helm/templates/theodolite/role-binding.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.theodolite.rbac.create -}}
+{{- if .Values.rbac.create -}}
 apiVersion: rbac.authorization.k8s.io/v1beta1
 kind: RoleBinding
 metadata:
diff --git a/execution/helm/templates/theodolite/role.yaml b/execution/helm/templates/theodolite/role.yaml
index 6cfedd220..84133c1b7 100644
--- a/execution/helm/templates/theodolite/role.yaml
+++ b/execution/helm/templates/theodolite/role.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.theodolite.rbac.create -}}
+{{- if .Values.rbac.create -}}
 apiVersion: rbac.authorization.k8s.io/v1
 kind: Role
 metadata:
diff --git a/execution/helm/templates/theodolite/serviceaccount.yaml b/execution/helm/templates/theodolite/serviceaccount.yaml
index cf06ad712..1ee80adc2 100644
--- a/execution/helm/templates/theodolite/serviceaccount.yaml
+++ b/execution/helm/templates/theodolite/serviceaccount.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.theodolite.serviceAccount.create -}}
+{{- if .Values.serviceAccount.create -}}
 apiVersion: v1
 kind: ServiceAccount
 metadata:
diff --git a/execution/helm/templates/theodolite/thedolite-operator.yaml b/execution/helm/templates/theodolite/thedolite-operator.yaml
index d53d9d0b3..6157f7ed5 100644
--- a/execution/helm/templates/theodolite/thedolite-operator.yaml
+++ b/execution/helm/templates/theodolite/thedolite-operator.yaml
@@ -1,8 +1,8 @@
-{{- if .Values.theodolite.operator.enabled -}}
+{{- if .Values.operator.enabled -}}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ include "theodolite.fullname" . }}
+  name: {{ include "theodolite.fullname" . }}-operator
 spec:
   selector:
     matchLabels:
@@ -17,10 +17,10 @@ spec:
       serviceAccountName:  {{ include "theodolite.serviceAccountName" . }}
       containers:
         - name: theodolite
-          image: lorenzboguhn/theodolite:latest
+          image: lorenzboguhn/thedolite:latest
           env:
             - name: NAMESPACE
-              value: {{ .Values.theodolite.operator.namespace}}
+              value: {{ .Values.operator.namespace}}
         - name: lag-analysis
           image: benediktwetzel/lag-analysis
           ports:
diff --git a/execution/helm/values.yaml b/execution/helm/values.yaml
index ed820eec1..bbbd99b3b 100644
--- a/execution/helm/values.yaml
+++ b/execution/helm/values.yaml
@@ -231,19 +231,18 @@ prometheus:
 ###
 # Theodolite Operator
 ###
-theodolite:
-  operator:
-    enabled: true
-    namespace: "default"
+operator:
+  enabled: true
+  namespace: "default"
 
-  executionCRD:
-    create: true
+executionCRD:
+  create: true
 
-  benchmarkCRD:
-    create: true
+benchmarkCRD:
+  create: true
 
-  serviceAccount:
-    create: true
+serviceAccount:
+  create: false
 
-  rbac: 
-    create: true
\ No newline at end of file
+rbac:
+  create: true
-- 
GitLab