From a4b9233ddcad20eba07c909059bc3b0f463d4ce1 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 25 Nov 2024 09:39:31 +0100 Subject: [PATCH] remove delete-lost-found initcontainer Signed-off-by: Simon L. --- .../nextcloud-aio-nextcloud-deployment.yaml | 24 ------------------- nextcloud-aio-helm-chart/update-helm.sh | 13 ---------- 2 files changed, 37 deletions(-) diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 6dcf9520ddc..3d592da9f67 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -37,30 +37,6 @@ spec: type: RuntimeDefault {{- end }} {{- end }} # AIO-config - do not change this comment! - initContainers: - - name: "delete-lost-found" - image: "alpine:3.20" - command: - - rm - - "-rf" - - "/nextcloud-aio-nextcloud/lost+found" - volumeMounts: - - name: nextcloud-aio-nextcloud-trusted-cacerts - mountPath: /nextcloud-aio-nextcloud-trusted-cacerts - - name: nextcloud-aio-nextcloud - mountPath: /nextcloud-aio-nextcloud - {{- if eq .Values.RPSS_ENABLED "yes" }} # AIO-config - do not change this comment! - securityContext: - # The items below only work in container context - allowPrivilegeEscalation: false - capabilities: - {{- if eq .Values.RPSS_ENABLED "yes" }} - drop: ["ALL"] - {{- else }} - drop: ["NET_RAW"] - {{- end }} - add: ["NET_BIND_SERVICE"] - {{- end }} # AIO-config - do not change this comment! # AIO settings start # Do not remove or change this line! - name: init-volumes image: "alpine:3.20" diff --git a/nextcloud-aio-helm-chart/update-helm.sh b/nextcloud-aio-helm-chart/update-helm.sh index 1b8f61b4624..81712c4fe78 100755 --- a/nextcloud-aio-helm-chart/update-helm.sh +++ b/nextcloud-aio-helm-chart/update-helm.sh @@ -102,17 +102,6 @@ cat << EOL > /tmp/initcontainers.clamav securityContext: EOL cat << EOL > /tmp/initcontainers.nextcloud - initContainers: - - name: "delete-lost-found" - image: "alpine:3.20" - command: - - rm - - "-rf" - - "/nextcloud-aio-nextcloud/lost+found" - volumeMountsInitRmLostFound: - {{- if eq .Values.RPSS_ENABLED "yes" }} # AIO-config - do not change this comment! - securityContext: - {{- end }} # AIO-config - do not change this comment! # AIO settings start # Do not remove or change this line! - name: init-volumes image: "alpine:3.20" @@ -144,7 +133,6 @@ for variable in "${DEPLOYMENTS[@]}"; do if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable" sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable" - sed -i "/volumeMountsInitRmLostFound:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable" # Workaround for the database volume if [ "$volumeName" = nextcloud-aio-database ]; then sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable" @@ -155,7 +143,6 @@ for variable in "${DEPLOYMENTS[@]}"; do fi done sed -i "s|volumeMountsInitContainer:|volumeMounts:|" "$variable" - sed -i "s|volumeMountsInitRmLostFound:|volumeMounts:|" "$variable" if grep -q claimName "$variable"; then claimNames="$(grep claimName "$variable")" mapfile -t claimNames <<< "$claimNames"