From 9b87efea182db027aa4a512db7d6266aa6379fb5 Mon Sep 17 00:00:00 2001
From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de>
Date: Wed, 14 Apr 2021 18:55:50 +0200
Subject: [PATCH] Set permissions correct and clean up

---
 execution/theodolite-kotlin.yaml |  5 +-
 execution/theodolite.yaml        | 78 +++++++++++++++++---------------
 2 files changed, 45 insertions(+), 38 deletions(-)

diff --git a/execution/theodolite-kotlin.yaml b/execution/theodolite-kotlin.yaml
index 784147791..a6f0c09b3 100644
--- a/execution/theodolite-kotlin.yaml
+++ b/execution/theodolite-kotlin.yaml
@@ -5,6 +5,8 @@ metadata:
 spec:
   template:
     spec:
+      securityContext:
+        runAsUser: 0
       containers:
         - name: lag-analysis
           image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
@@ -12,8 +14,9 @@ spec:
           - containerPort: 80
             name: analysis
         - name: theodolite
-          image: lorenzboguhn/thedolite #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
+          image: benediktwetzel/theodolite-test #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
           imagePullPolicy: Always
+          # command: ["/bin/sh", "-ec", "while :; do echo '.'; sleep 5 ; done"]
           env:
             - name: NAMESPACE
               value: theodolite-she
diff --git a/execution/theodolite.yaml b/execution/theodolite.yaml
index 06d14a0f5..bf40f2f4f 100644
--- a/execution/theodolite.yaml
+++ b/execution/theodolite.yaml
@@ -5,47 +5,51 @@ metadata:
 spec:
   template:
     spec:
-      volumes:
-      - name: theodolite-pv-storage
-        persistentVolumeClaim:
-          claimName: theodolite-pv-claim
+      securityContext:
+        runAsUser: 0
       containers:
+        - name: lag-analysis
+          image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
+          ports:
+          - containerPort: 80
+            name: analysis
         - name: theodolite
-          image: ghcr.io/cau-se/theodolite:latest
-          # imagePullPolicy: Never # Used to pull "own" local image
+          image: lorenzboguhn/thedolite #benediktwetzel/theodolite-test #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
+          imagePullPolicy: Always
           env:
-            - name: UC # mandatory
-              value: "1"
-            - name: LOADS # mandatory
-              value: "100000, 200000"
-            - name: INSTANCES # mandatory
-              value: "1, 2, 3"
-            # - name: DURATION
-            #   value: "5"
-            # - name: PARTITIONS
-            #   value: "40"
-            # - name: DOMAIN_RESTRICTION
-            #   value: "True"
-            # - name: SEARCH_STRATEGY
-            #   value: "linear-search"
-            # - name: CPU_LIMIT
-            #   value: "1000m"
-            # - name: MEMORY_LIMIT
-            #   value: "4Gi"
-            - name: PROMETHEUS_BASE_URL
-              value: "http://prometheus-operated:9090"
-            # - name: NAMESPACE
-            #   value: "default"
-            # - name: CONFIGURATIONS
-            #   value: "COMMIT_INTERVAL_MS=100, NUM_STREAM_THREADS=1"
-            - name: RESULT_PATH
-              value: "results"
-            - name: PYTHONUNBUFFERED # Enable logs in Kubernetes
-              value: "1"
+            - name: NAMESPACE
+              value: theodolite-she
+            - name: MODE
+              value: yaml-executor
+            - name: THEODOLITE_EXECUTION
+              value: /etc/execution/example-execution-yaml-resource.yaml
+            - name: THEODOLITE_BENCHMARK
+              value: /etc/benchmark/example-benchmark-yaml-resource.yaml
+            - name: THEODOLITE_APP_RESOURCES
+              value: /etc/app-resources
           volumeMounts:
-            - mountPath: "/app/results"
+            - mountPath: "/deployments/results"
               name: theodolite-pv-storage
+            - mountPath: "/etc/app-resources"
+              name: app-resources
+            - mountPath: "/etc/benchmark" 
+              name: benchmark
+            - mountPath: "/etc/execution"
+              name: execution
       restartPolicy: Never
       # Uncomment if RBAC is enabled and configured
-      # serviceAccountName: theodolite
-  backoffLimit: 4
+      serviceAccountName: theodolite
+      volumes:
+        - name: theodolite-pv-storage
+          persistentVolumeClaim:
+            claimName: theodolite-pv-claim
+        - name: app-resources
+          configMap:
+            name: app-resources-configmap
+        - name: benchmark
+          configMap:
+            name: benchmark-configmap
+        - name: execution
+          configMap:
+            name: execution-configmap
+  backoffLimit: 4
\ No newline at end of file
-- 
GitLab