diff --git a/execution/helm/templates/theodolite/theodolite-operator.yaml b/execution/helm/templates/theodolite/theodolite-operator.yaml index 899b631ba871fd87a561250f26c43767ffef7e57..7e9194fb47956e9dfa447a5bf7f820f34bbd50d4 100644 --- a/execution/helm/templates/theodolite/theodolite-operator.yaml +++ b/execution/helm/templates/theodolite/theodolite-operator.yaml @@ -15,6 +15,8 @@ spec: spec: terminationGracePeriodSeconds: 0 serviceAccountName: {{ include "theodolite.serviceAccountName" . }} + securityContext: + runAsUser: 0 # Set the permissions for write access to the volumes. containers: - name: theodolite image: "{{ .Values.operator.image }}:{{ .Values.operator.imageTag }}" @@ -26,7 +28,13 @@ spec: value: operator - name: THEODOLITE_APP_RESOURCES value: "./benchmark-resources" + - name: RESULTS_FOLDER + value: "results" volumeMounts: + {{- if .Values.operator.resultsVolume.enabled }} + - name: theodolite-pv-storage + mountPath: "/deployments/results" + {{- end }} - name: benchmark-resources mountPath: /work/benchmark-resources {{- if .Values.operator.sloChecker.lagTrend.enabled }} @@ -40,7 +48,25 @@ spec: - name: LOG_LEVEL value: INFO {{- end }} + {{- if and .Values.operator.resultsVolume.enabled .Values.operator.resultsVolume.accessSidecar.enabled }} + - name: results-access + image: busybox:stable + image: "{{ .Values.operator.resultsVolume.accessSidecar.image }}:{{ .Values.operator.resultsVolume.accessSidecar.imageTag }}" + imagePullPolicy: "{{ .Values.operator.resultsVolume.accessSidecar.imagePullPolicy }}" + command: + - sh + - -c + - exec tail -f /dev/null + volumeMounts: + - mountPath: /results + name: theodolite-pv-storage + {{- end }} volumes: + {{- if .Values.operator.resultsVolume.enabled }} + - name: theodolite-pv-storage + persistentVolumeClaim: + claimName: {{ .Values.operator.resultsVolume.persistentVolumeClaim.name | quote }} + {{- end }} - name: benchmark-resources configMap: name: benchmark-resources diff --git a/execution/helm/values.yaml b/execution/helm/values.yaml index 375d0b17e65365a8a713f4d8a8eee72154d23ed7..4b970bf868092bca5571cb1ea0ba2360945c8ebf 100644 --- a/execution/helm/values.yaml +++ b/execution/helm/values.yaml @@ -262,6 +262,17 @@ operator: imageTag: theodolite-kotlin-latest imagePullPolicy: Always + resultsVolume: + enabled: true + persistentVolumeClaim: + name: theodolite-pv-claim + accessSidecar: + enabled: true + image: busybox + imageTag: stable + imagePullPolicy: IfNotPresent + + serviceAccount: create: true