Allow writable root filesystem for the linuxserver.io containers
With readOnlyRootFilesystem the s6-overlay init cannot rewrite /etc/passwd, so the containers silently kept the image's built-in uid/gid 911 instead of the configured PUID/PGID (verified at runtime) - breaking ownership on the shared media volumes. Drop the now-unneeded /run and /tmp emptyDirs; deviation documented in values.yaml.
This commit is contained in:
2 files changed
+15
-62
No files matched your search
@@ -134,12 +134,6 @@ spec:
|
|||||||
name: qbittorrent-config
|
name: qbittorrent-config
|
||||||
- mountPath: /downloads
|
- mountPath: /downloads
|
||||||
name: media-downloads
|
name: media-downloads
|
||||||
# Writable paths for s6-overlay so the root filesystem stays
|
|
||||||
# read-only (same pattern for all linuxserver.io containers).
|
|
||||||
- mountPath: /run
|
|
||||||
name: qbittorrent-run
|
|
||||||
- mountPath: /tmp
|
|
||||||
name: qbittorrent-tmp
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.prowlarr.enabled }}
|
{{- if .Values.prowlarr.enabled }}
|
||||||
- name: prowlarr
|
- name: prowlarr
|
||||||
@@ -170,10 +164,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /config
|
- mountPath: /config
|
||||||
name: prowlarr-config
|
name: prowlarr-config
|
||||||
- mountPath: /run
|
|
||||||
name: prowlarr-run
|
|
||||||
- mountPath: /tmp
|
|
||||||
name: prowlarr-tmp
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.flaresolverr.enabled }}
|
{{- if .Values.flaresolverr.enabled }}
|
||||||
- name: flaresolverr
|
- name: flaresolverr
|
||||||
@@ -239,10 +229,6 @@ spec:
|
|||||||
name: media-movies
|
name: media-movies
|
||||||
- mountPath: /downloads
|
- mountPath: /downloads
|
||||||
name: media-downloads
|
name: media-downloads
|
||||||
- mountPath: /run
|
|
||||||
name: radarr-run
|
|
||||||
- mountPath: /tmp
|
|
||||||
name: radarr-tmp
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.recyclarr.enabled }}
|
{{- if .Values.recyclarr.enabled }}
|
||||||
- name: recyclarr
|
- name: recyclarr
|
||||||
@@ -307,10 +293,6 @@ spec:
|
|||||||
name: media-tv
|
name: media-tv
|
||||||
- mountPath: /downloads
|
- mountPath: /downloads
|
||||||
name: media-downloads
|
name: media-downloads
|
||||||
- mountPath: /run
|
|
||||||
name: sonarr-run
|
|
||||||
- mountPath: /tmp
|
|
||||||
name: sonarr-tmp
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.seerr.enabled }}
|
{{- if .Values.seerr.enabled }}
|
||||||
- name: seerr
|
- name: seerr
|
||||||
@@ -375,10 +357,6 @@ spec:
|
|||||||
name: media-movies
|
name: media-movies
|
||||||
- mountPath: /tv
|
- mountPath: /tv
|
||||||
name: media-tv
|
name: media-tv
|
||||||
- mountPath: /run
|
|
||||||
name: bazarr-run
|
|
||||||
- mountPath: /tmp
|
|
||||||
name: bazarr-tmp
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
volumes:
|
volumes:
|
||||||
@@ -402,18 +380,6 @@ spec:
|
|||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ required "media.tv.existingClaim is required when sonarr or bazarr is enabled" .Values.media.tv.existingClaim }}
|
claimName: {{ required "media.tv.existingClaim is required when sonarr or bazarr is enabled" .Values.media.tv.existingClaim }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.qbittorrent.enabled }}
|
|
||||||
- name: qbittorrent-run
|
|
||||||
emptyDir: {}
|
|
||||||
- name: qbittorrent-tmp
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.prowlarr.enabled }}
|
|
||||||
- name: prowlarr-run
|
|
||||||
emptyDir: {}
|
|
||||||
- name: prowlarr-tmp
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.flaresolverr.enabled }}
|
{{- if .Values.flaresolverr.enabled }}
|
||||||
- name: flaresolverr-tmp
|
- name: flaresolverr-tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
@@ -422,32 +388,14 @@ spec:
|
|||||||
medium: Memory
|
medium: Memory
|
||||||
sizeLimit: 512Mi
|
sizeLimit: 512Mi
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.radarr.enabled }}
|
|
||||||
- name: radarr-run
|
|
||||||
emptyDir: {}
|
|
||||||
- name: radarr-tmp
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.recyclarr.enabled }}
|
{{- if .Values.recyclarr.enabled }}
|
||||||
- name: recyclarr-tmp
|
- name: recyclarr-tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.sonarr.enabled }}
|
|
||||||
- name: sonarr-run
|
|
||||||
emptyDir: {}
|
|
||||||
- name: sonarr-tmp
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.seerr.enabled }}
|
{{- if .Values.seerr.enabled }}
|
||||||
- name: seerr-tmp
|
- name: seerr-tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.bazarr.enabled }}
|
|
||||||
- name: bazarr-run
|
|
||||||
emptyDir: {}
|
|
||||||
- name: bazarr-tmp
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
# Config volumes for gluetun and the enabled apps. NOTE: volumeClaimTemplates
|
# Config volumes for gluetun and the enabled apps. NOTE: volumeClaimTemplates
|
||||||
# are immutable - toggling an app's enabled flag later requires recreating
|
# are immutable - toggling an app's enabled flag later requires recreating
|
||||||
# the StatefulSet once (kubectl delete statefulset <name> --cascade=orphan
|
# the StatefulSet once (kubectl delete statefulset <name> --cascade=orphan
|
||||||
|
|||||||
+15
-10
@@ -192,17 +192,22 @@ qbittorrent:
|
|||||||
ephemeralStorage: 100Mi
|
ephemeralStorage: 100Mi
|
||||||
# Deviations from the hardening baseline, forced by the linuxserver.io
|
# Deviations from the hardening baseline, forced by the linuxserver.io
|
||||||
# images (s6-overlay init that starts as root and drops to PUID/PGID):
|
# images (s6-overlay init that starts as root and drops to PUID/PGID):
|
||||||
# - no runAsNonRoot: s6-overlay must start as root to create the abc user
|
# - no runAsNonRoot: s6-overlay must start as root to apply PUID/PGID and
|
||||||
# from PUID/PGID and chown /config.
|
# chown /config.
|
||||||
|
# - readOnlyRootFilesystem: false: the s6 init applies PUID/PGID by
|
||||||
|
# rewriting /etc/passwd and /etc/group and stages runtime state on the
|
||||||
|
# root filesystem. With a read-only root filesystem the containers still
|
||||||
|
# start, but silently keep the image's built-in uid/gid (911) instead of
|
||||||
|
# PUID/PGID (verified at runtime) - unacceptable for the shared media
|
||||||
|
# volumes.
|
||||||
# - capabilities: ALL dropped except what the s6-overlay init needs:
|
# - capabilities: ALL dropped except what the s6-overlay init needs:
|
||||||
# CHOWN/FOWNER/DAC_OVERRIDE (taking ownership of /config and /run) and
|
# CHOWN/FOWNER/DAC_OVERRIDE (taking ownership of /config and /run) and
|
||||||
# SETUID/SETGID (dropping from root to the PUID/PGID user).
|
# SETUID/SETGID (dropping from root to the PUID/PGID user).
|
||||||
# readOnlyRootFilesystem stays true: the writable paths (/run, /tmp) are
|
# (Same block for all linuxserver.io containers: qbittorrent, prowlarr,
|
||||||
# mounted as emptyDirs. (Same block for all linuxserver.io containers:
|
# radarr, sonarr, bazarr.)
|
||||||
# qbittorrent, prowlarr, radarr, sonarr, bazarr.)
|
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
@@ -255,7 +260,7 @@ prowlarr:
|
|||||||
# linuxserver.io image - see the qbittorrent securityContext comment.
|
# linuxserver.io image - see the qbittorrent securityContext comment.
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
@@ -362,7 +367,7 @@ radarr:
|
|||||||
# linuxserver.io image - see the qbittorrent securityContext comment.
|
# linuxserver.io image - see the qbittorrent securityContext comment.
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
@@ -467,7 +472,7 @@ sonarr:
|
|||||||
# linuxserver.io image - see the qbittorrent securityContext comment.
|
# linuxserver.io image - see the qbittorrent securityContext comment.
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
@@ -571,7 +576,7 @@ bazarr:
|
|||||||
# linuxserver.io image - see the qbittorrent securityContext comment.
|
# linuxserver.io image - see the qbittorrent securityContext comment.
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
|
|||||||
Reference in new issue
Block a user