From b735394c0a691df31ebcd879bcafa0d1ce93aa83 Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Wed, 14 Apr 2021 16:20:56 +0200
Subject: [PATCH] Fix volume error

also fix the result folder permisions in the docker files
---
 execution/theodolite-kotlin.yaml                    | 13 ++++++-------
 theodolite-quarkus/src/main/docker/Dockerfile.jvm   |  2 +-
 .../src/main/docker/Dockerfile.native               |  1 +
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/execution/theodolite-kotlin.yaml b/execution/theodolite-kotlin.yaml
index e4b2ea817..784147791 100644
--- a/execution/theodolite-kotlin.yaml
+++ b/execution/theodolite-kotlin.yaml
@@ -5,10 +5,6 @@ metadata:
 spec:
   template:
     spec:
-      volumes:
-        - name: theodolite-pv-storage
-          persistentVolumeClaim:
-            claimName: theodolite-pv-claim
       containers:
         - name: lag-analysis
           image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
@@ -16,7 +12,7 @@ spec:
           - containerPort: 80
             name: analysis
         - name: theodolite
-          image: benediktwetzel/theodolite-test #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
+          image: lorenzboguhn/thedolite #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
           imagePullPolicy: Always
           env:
             - name: NAMESPACE
@@ -30,18 +26,21 @@ spec:
             - name: THEODOLITE_APP_RESOURCES
               value: /etc/app-resources
           volumeMounts:
+            - mountPath: "/deployments/results"
+              name: theodolite-pv-storage
             - mountPath: "/etc/app-resources"
               name: app-resources
             - mountPath: "/etc/benchmark" 
               name: benchmark
             - mountPath: "/etc/execution"
               name: execution
-            - mountPath: "/deployments/results"
-              name: theodolite-pv-storage
       restartPolicy: Never
       # Uncomment if RBAC is enabled and configured
       serviceAccountName: theodolite
       volumes:
+        - name: theodolite-pv-storage
+          persistentVolumeClaim:
+            claimName: theodolite-pv-claim
         - name: app-resources
           configMap:
             name: app-resources-configmap
diff --git a/theodolite-quarkus/src/main/docker/Dockerfile.jvm b/theodolite-quarkus/src/main/docker/Dockerfile.jvm
index 758358fe4..ebe10de12 100644
--- a/theodolite-quarkus/src/main/docker/Dockerfile.jvm
+++ b/theodolite-quarkus/src/main/docker/Dockerfile.jvm
@@ -34,7 +34,7 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
     && mkdir /deployments \
     && chown 1001 /deployments \
     && mkdir deployments/results \
-    && chown 1001 deployments/results \ 
+    && chown 777 deployments/results \
     && chmod "g+rwX" /deployments \
     && chown 1001:root /deployments \
     && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \
diff --git a/theodolite-quarkus/src/main/docker/Dockerfile.native b/theodolite-quarkus/src/main/docker/Dockerfile.native
index 7c0f04a01..67d904d30 100644
--- a/theodolite-quarkus/src/main/docker/Dockerfile.native
+++ b/theodolite-quarkus/src/main/docker/Dockerfile.native
@@ -18,6 +18,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
 WORKDIR /deployments
 RUN chown 1001 /deployments \
     && mkdir results \
+    && chown 777 deployments/results \
     && chmod "g+rwX" /deployments \
     && chown 1001:root /deployments
 COPY --chown=1001:root build/*-runner /deployments/application
-- 
GitLab