32611bfd16
Deploys the released mediamover v0.1.0 into the arrstack namespace: a single-replica server (API + UI on :8080) that browses the mediafs source, queues per-file copy/move operations into the media PVCs, and spawns one worker Job per file using its own image — its ServiceAccount/RBAC grants the Job and Pod access that requires. All PVs/PVCs it mounts are already live. - Adds `apps/base/arrstack/mediamover/` with SA, Role/RoleBinding (batch jobs create/get/list/watch/delete; pods get/list/watch; pods/log get/list), Deployment, Service, Gateway, HTTPRoute - Runs `mediamover server` with `--src-root /srv/src --src-pvc mediafs`, `--dst-roots movies=/srv/dst/movies,tv=/srv/dst/tv`, `--dst-pvc movies=media-movies,tv=media-tv`, `--namespace arrstack`, `--image ...mediamover:v0.1.0` - Mounts mediafs RW at /srv/src (move deletes the source) plus media-movies and media-tv destinations; keeps 1 replica with Recreate strategy since the queue is in-memory - Names the Service `mediamover` on 8080 to match the worker callback default `http://mediamover.arrstack.svc:8080` - Exposes the UI at https://mediamover.k8s.syd1.au.unkin.net via a dedicated internal Gateway (pdbmux pattern); the existing arrproxy Gateway is external and hostname-locked to arrstack.unkin.net so it cannot carry this route - Probes hit `GET /api/limit` (the server has no dedicated health endpoint); registers `mediamover` in the arrstack base kustomization Reviewed-on: #393 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
96 lines
2.8 KiB
YAML
96 lines
2.8 KiB
YAML
---
|
|
# mediamover server: REST API + UI on :8080. Spawns one worker Job per queued
|
|
# file using this same image with `worker` args (Job spec lives in code; workers
|
|
# run as the default ServiceAccount and mount the same PVCs). The queue is
|
|
# in-memory, so keep a single replica; a restart just loses queued entries.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mediamover
|
|
namespace: arrstack
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mediamover
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mediamover
|
|
spec:
|
|
serviceAccountName: mediamover
|
|
automountServiceAccountToken: true
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 65532
|
|
runAsGroup: 65532
|
|
fsGroup: 65532
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: server
|
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/mediamover:v0.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- server
|
|
- --src-root=/srv/src
|
|
- --src-pvc=mediafs
|
|
- --dst-roots=movies=/srv/dst/movies,tv=/srv/dst/tv
|
|
- --dst-pvc=movies=media-movies,tv=media-tv
|
|
- --namespace=arrstack
|
|
- --image=artifactapi.k8s.syd1.au.unkin.net/docker-internal/mediamover:v0.1.0
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
volumeMounts:
|
|
# RW: move mode deletes the source file after a successful copy.
|
|
- name: src
|
|
mountPath: /srv/src
|
|
- name: dst-movies
|
|
mountPath: /srv/dst/movies
|
|
- name: dst-tv
|
|
mountPath: /srv/dst/tv
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/limit
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/limit
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
volumes:
|
|
- name: src
|
|
persistentVolumeClaim:
|
|
claimName: mediafs
|
|
- name: dst-movies
|
|
persistentVolumeClaim:
|
|
claimName: media-movies
|
|
- name: dst-tv
|
|
persistentVolumeClaim:
|
|
claimName: media-tv
|
|
restartPolicy: Always
|