mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
remove delete-lost-found initcontainer
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
069b414d81
commit
e800ed48f9
2 changed files with 2 additions and 37 deletions
|
|
@ -37,31 +37,8 @@ spec:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }} # AIO-config - do not change this comment!
|
{{- 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!
|
# AIO settings start # Do not remove or change this line!
|
||||||
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
image: "alpine:3.20"
|
image: "alpine:3.20"
|
||||||
command:
|
command:
|
||||||
|
|
|
||||||
|
|
@ -102,18 +102,8 @@ cat << EOL > /tmp/initcontainers.clamav
|
||||||
securityContext:
|
securityContext:
|
||||||
EOL
|
EOL
|
||||||
cat << EOL > /tmp/initcontainers.nextcloud
|
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!
|
# AIO settings start # Do not remove or change this line!
|
||||||
|
initContainers:
|
||||||
- name: init-volumes
|
- name: init-volumes
|
||||||
image: "alpine:3.20"
|
image: "alpine:3.20"
|
||||||
command:
|
command:
|
||||||
|
|
@ -144,7 +134,6 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
||||||
if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then
|
if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then
|
||||||
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
||||||
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$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
|
# Workaround for the database volume
|
||||||
if [ "$volumeName" = nextcloud-aio-database ]; then
|
if [ "$volumeName" = nextcloud-aio-database ]; then
|
||||||
sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
|
sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
|
||||||
|
|
@ -155,7 +144,6 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
sed -i "s|volumeMountsInitContainer:|volumeMounts:|" "$variable"
|
sed -i "s|volumeMountsInitContainer:|volumeMounts:|" "$variable"
|
||||||
sed -i "s|volumeMountsInitRmLostFound:|volumeMounts:|" "$variable"
|
|
||||||
if grep -q claimName "$variable"; then
|
if grep -q claimName "$variable"; then
|
||||||
claimNames="$(grep claimName "$variable")"
|
claimNames="$(grep claimName "$variable")"
|
||||||
mapfile -t claimNames <<< "$claimNames"
|
mapfile -t claimNames <<< "$claimNames"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue