86d975c1f1
Adds the static PV/PVC trio for the new 10Ti "mediastore" CephFS subvolume
plus a bootstrap Job that seeds its directory tree. Purely additive: the
existing media-tv/media-movies volumes are untouched.
- add static PVs arrstack-mediastore, fafflix-mediastore, cheeztv-mediastore
all pinned to the same rootPath on cephfs_csi_ssd_ec_4_1
- add the matching RWX 10Ti PVCs, k8up-excluded, statically bound by
volumeName + storageClassName ""
- add mediastore-bootstrap, an ArgoCD Sync-hook Job that mkdir -p's
/{fafflix,cheeztv}/{tvseries,movies} and /nzbget/downloads/complete as
uid/gid 1000
- wire the new manifests into the arrstack, fafflix and cheeztv bases
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
---
|
|
# Seeds the directory skeleton on the freshly created mediastore subvolume so
|
|
# the arrs, nzbget and both jellyfins mount subPaths that already exist and are
|
|
# owned by uid/gid 1000 (the uid every arrstack media pod runs as). mkdir -p is
|
|
# idempotent, so re-running it on every sync is harmless and self-heals a tree
|
|
# someone deleted by hand.
|
|
#
|
|
# Sync hook with BeforeHookCreation delete: ArgoCD replaces the completed Job
|
|
# each sync instead of failing on the immutable pod template. No sync-wave is
|
|
# needed -- the PVC applies in the same wave and the pod simply stays Pending
|
|
# until it binds.
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: mediastore-bootstrap
|
|
namespace: arrstack
|
|
annotations:
|
|
argocd.argoproj.io/hook: Sync
|
|
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
|
|
spec:
|
|
backoffLimit: 6
|
|
ttlSecondsAfterFinished: 600
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mediastore-bootstrap
|
|
spec:
|
|
serviceAccountName: default
|
|
automountServiceAccountToken: false
|
|
restartPolicy: Never
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: OnRootMismatch
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: mkdir
|
|
image: docker.io/library/alpine:3
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
set -eu
|
|
mkdir -p \
|
|
/media/fafflix/tvseries \
|
|
/media/fafflix/movies \
|
|
/media/cheeztv/tvseries \
|
|
/media/cheeztv/movies \
|
|
/media/nzbget/downloads/complete
|
|
ls -la /media
|
|
volumeMounts:
|
|
- name: mediastore
|
|
mountPath: /media
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 32Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|
|
volumes:
|
|
- name: mediastore
|
|
persistentVolumeClaim:
|
|
claimName: mediastore
|