Skip to content

Commit

Permalink
Update update-helm.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
szaimen committed Nov 21, 2024
1 parent 9de1840 commit eb4f305
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions nextcloud-aio-helm-chart/update-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,14 @@ cat << EOL > /tmp/initcontainers.nextcloud
volumeMountsInitRmLostFound:
{{- if eq .Values.RPSS_ENABLED "yes" }} # AIO-config - do not change this comment!
securityContext:
{{- else }} # AIO-config - do not change this comment!
{{- if eq .Values.RPSS_ENABLED "yes" }}
{{- if ne .Values.RPSS_ENABLED "yes" }}
- name: init-volumes
image: "alpine:3.20"
command:
- chmod
- "777"
volumeMountsInitContainer:
{{- end }}
{{- end }}
{{- end }} # AIO-config - do not change this comment!
EOL

Expand Down Expand Up @@ -166,7 +165,7 @@ for variable in "${DEPLOYMENTS[@]}"; do
if echo "$variable" | grep -q "nextcloud-deployment.yaml"; then
USER=33
GROUP=33
echo ' {{- if eq .Values.RPSS_ENABLED "yes" }} # AIO-config - do not change this comment!' > /tmp/pod.securityContext
echo ' {{- if eq .Values.RPSS_ENABLED "yes" }} # AIO-config - do not change this comment!' > /tmp/pod.securityContext
else
USER="$(grep runAsUser "$variable" | grep -oP '[0-9]+')"
GROUP="$USER"
Expand All @@ -190,7 +189,7 @@ for variable in "${DEPLOYMENTS[@]}"; do
{{- end }}
EOL
if echo "$variable" | grep -q "nextcloud-deployment.yaml"; then
echo " {{- end }} # AIO-config - do not change this comment!" >> /tmp/pod.securityContext
echo " {{- end }} # AIO-config - do not change this comment!" >> /tmp/pod.securityContext
fi
sed -i "/^ spec:$/r /tmp/pod.securityContext" "$variable"
fi
Expand Down

0 comments on commit eb4f305

Please sign in to comment.