mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Merge pull request #5831 from nextcloud/enh/noid/remove-nbs-if-not-need
helm: remove NET_BIND_SERVICE if not needed
This commit is contained in:
commit
8904349e5d
10 changed files with 5 additions and 17 deletions
|
|
@ -53,7 +53,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: CLAMD_STARTUP_TIMEOUT
|
- name: CLAMD_STARTUP_TIMEOUT
|
||||||
|
|
@ -92,7 +91,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/lib/clamav
|
- mountPath: /var/lib/clamav
|
||||||
subPath: data
|
subPath: data
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: PGTZ
|
- name: PGTZ
|
||||||
|
|
@ -93,7 +92,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/lib/postgresql/data
|
- mountPath: /var/lib/postgresql/data
|
||||||
subPath: data
|
subPath: data
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,4 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add:
|
|
||||||
- NET_BIND_SERVICE
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
{{- end }} # AIO-config - do not change this comment!
|
{{- end }} # AIO-config - do not change this comment!
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /nextcloud
|
- mountPath: /nextcloud
|
||||||
name: nextcloud-aio-nextcloud
|
name: nextcloud-aio-nextcloud
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /data
|
||||||
name: nextcloud-aio-redis
|
name: nextcloud-aio-redis
|
||||||
|
|
|
||||||
|
|
@ -84,5 +84,4 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /tmp
|
- mountPath: /tmp
|
||||||
name: nextcloud-aio-talk-recording
|
name: nextcloud-aio-talk-recording
|
||||||
|
|
|
||||||
|
|
@ -74,5 +74,4 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ yq -i 'del(.services.[].tmpfs)' latest.yml
|
||||||
# Remove cap_drop in order to add it later again easier
|
# Remove cap_drop in order to add it later again easier
|
||||||
yq -i 'del(.services.[].cap_drop)' latest.yml
|
yq -i 'del(.services.[].cap_drop)' latest.yml
|
||||||
# Remove SYS_NICE for imaginary as it is not supported with RPSS
|
# Remove SYS_NICE for imaginary as it is not supported with RPSS
|
||||||
sed -i "s|- SYS_NICE$|- NET_BIND_SERVICE|" latest.yml
|
yq -i 'del(.services."nextcloud-aio-imaginary".cap_add)' latest.yml
|
||||||
# cap SYS_ADMIN is called CAP_SYS_ADMIN in k8s
|
# cap SYS_ADMIN is called CAP_SYS_ADMIN in k8s
|
||||||
sed -i "s|- SYS_ADMIN$|- CAP_SYS_ADMIN|" latest.yml
|
sed -i "s|- SYS_ADMIN$|- CAP_SYS_ADMIN|" latest.yml
|
||||||
|
|
||||||
|
|
@ -461,10 +461,9 @@ cat << EOL > /tmp/security.conf
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
EOL
|
EOL
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
find ./ \( -not -name '*collabora-deployment.yaml*' -not -name '*imaginary-deployment.yaml*' -not -name '*onlyoffice-deployment.yaml*' -name "*deployment.yaml" \) -exec sed -i "/^ securityContext:$/r /tmp/security.conf" \{} \;
|
find ./ \( -not -name '*collabora-deployment.yaml*' -not -name '*apache-deployment.yaml*' -not -name '*onlyoffice-deployment.yaml*' -name "*deployment.yaml" \) -exec sed -i "/^ securityContext:$/r /tmp/security.conf" \{} \;
|
||||||
|
|
||||||
cat << EOL > /tmp/security.conf
|
cat << EOL > /tmp/security.conf
|
||||||
# The items below only work in container context
|
# The items below only work in container context
|
||||||
|
|
@ -475,9 +474,11 @@ cat << EOL > /tmp/security.conf
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
add: ["NET_BIND_SERVICE"]
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
find ./ -name '*imaginary-deployment.yaml*' -exec sed -i "/^ securityContext:$/r /tmp/security.conf" \{} \;
|
find ./ -name '*apache-deployment.yaml*' -exec sed -i "/^ securityContext:$/r /tmp/security.conf" \{} \;
|
||||||
|
|
||||||
cat << EOL > /tmp/security.conf
|
cat << EOL > /tmp/security.conf
|
||||||
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }} # AIO-config - do not change this comment!
|
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }} # AIO-config - do not change this comment!
|
||||||
|
|
@ -490,7 +491,6 @@ cat << EOL > /tmp/security.conf
|
||||||
{{- else }}
|
{{- else }}
|
||||||
drop: ["NET_RAW"]
|
drop: ["NET_RAW"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
add: ["NET_BIND_SERVICE"]
|
|
||||||
{{- end }} # AIO-config - do not change this comment!
|
{{- end }} # AIO-config - do not change this comment!
|
||||||
EOL
|
EOL
|
||||||
# shellcheck disable=SC1083
|
# shellcheck disable=SC1083
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue