e03aeca101
Why: The media stack (jellyfin plus the sonarr/radarr/prowlarr/bazarr/nzbget/ jellyseerr apps) runs in the media-apps namespace but is deployed out-of-band by terraform-k8s rather than GitOps. Bringing it under ArgoCD makes the stack declarative, self-healing, and consistent with every other cluster workload, and prepares terraform-k8s to drop the media-apps config. How: - Add a media AppProject scoped to the media-apps namespace and a media-apps ApplicationSet that renders one Application per app plus a shared foundation. - Add a shared media-apps foundation (namespace, media-apps-vault-reader ServiceAccount, default VaultAuth on k8s/au/syd1, and the RWX movies/tvseries library PVCs) that the whole stack mounts. - Add per-app kustomize base and au-syd1 overlay for jellyfin and the six *arr apps, using plain resource names (jellyfin, sonarr, ...) with fresh PVCs. - Deploy jellyfin from the jellyfin-ha fork (Redis transcode store, RWX transcode scratch) wired to the shared movies/tvseries library PVCs, keeping the intel iGPU nodeSelector and gpu.intel.com/i915 request. - Source API keys and nzbget credentials through VSO VaultStaticSecrets from kv/service/media-apps/<app>; expose each app via a traefik-internal Gateway and HTTPRoute at <app>.k8s.syd1.au.unkin.net. - Register the media project and applicationset in the argocd bootstrap kustomizations.
137 lines
3.5 KiB
YAML
137 lines
3.5 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: prowlarr
|
|
namespace: media-apps
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: prowlarr
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: prowlarr
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
initContainers:
|
|
- name: config-template
|
|
image: busybox:latest
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/bin/sh"]
|
|
args:
|
|
- -c
|
|
- |
|
|
cp /config-template/config.xml /config/config.xml
|
|
sed -i "s/{{API_KEY}}/$API_KEY/g" /config/config.xml
|
|
env:
|
|
- name: API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: prowlarr-secrets
|
|
key: apitoken
|
|
securityContext:
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
runAsNonRoot: true
|
|
volumeMounts:
|
|
- name: config-template
|
|
mountPath: /config-template
|
|
- name: config
|
|
mountPath: /config
|
|
containers:
|
|
- name: prowlarr
|
|
image: ghcr.io/home-operations/prowlarr:rolling
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 9696
|
|
protocol: TCP
|
|
env:
|
|
- name: TZ
|
|
value: Australia/Sydney
|
|
- name: PUID
|
|
value: "1000"
|
|
- name: PGID
|
|
value: "1000"
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /config
|
|
- name: exportarr
|
|
image: ghcr.io/onedr0p/exportarr:latest
|
|
imagePullPolicy: IfNotPresent
|
|
args: ["prowlarr"]
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9707
|
|
protocol: TCP
|
|
env:
|
|
- name: TZ
|
|
value: Australia/Sydney
|
|
- name: PORT
|
|
value: "9707"
|
|
- name: URL
|
|
value: "http://localhost:9696"
|
|
- name: API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: prowlarr-secrets
|
|
key: apitoken
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 250m
|
|
memory: 256Mi
|
|
securityContext:
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
runAsNonRoot: true
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /metrics
|
|
port: metrics
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /config
|
|
readOnly: true
|
|
volumes:
|
|
- name: config
|
|
persistentVolumeClaim:
|
|
claimName: prowlarr-config
|
|
- name: config-template
|
|
configMap:
|
|
name: prowlarr-config-xml
|