Add media-apps stack to ArgoCD
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful

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.
This commit is contained in:
Ben Vincent
2026-08-09 13:25:25 +10:00
parent 4d58f37ea5
commit e03aeca101
72 changed files with 2111 additions and 0 deletions
@@ -5,6 +5,7 @@ kind: Kustomization
resources:
- aitooling.yaml
- logging.yaml
- media.yaml
- observability.yaml
- platform.yaml
- storage.yaml
+41
View File
@@ -0,0 +1,41 @@
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: media-apps
namespace: argocd
spec:
generators:
- git:
repoURL: https://git.unkin.net/unkin/argocd-apps
revision: HEAD
directories:
# Shared foundation: media-apps namespace, vault-reader SA, VaultAuth,
# and the RWX movies/tvseries library PVCs the whole stack mounts.
- path: apps/overlays/*/media-apps
- path: apps/overlays/*/jellyfin
- path: apps/overlays/*/sonarr
- path: apps/overlays/*/radarr
- path: apps/overlays/*/prowlarr
- path: apps/overlays/*/bazarr
- path: apps/overlays/*/nzbget
- path: apps/overlays/*/jellyseerr
template:
metadata:
name: 'media-{{path[3]}}'
spec:
project: media
source:
repoURL: https://git.unkin.net/unkin/argocd-apps
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
# All media apps share the media-apps namespace (not the dir name).
namespace: media-apps
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- ServerSideApply=true
+1
View File
@@ -5,6 +5,7 @@ kind: Kustomization
resources:
- aitooling.yaml
- logging.yaml
- media.yaml
- observability.yaml
- platform.yaml
- storage.yaml
+19
View File
@@ -0,0 +1,19 @@
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: media
namespace: argocd
spec:
description: Media services (jellyfin + *arr stack)
sourceRepos:
- https://git.unkin.net/unkin/argocd-apps
destinations:
- namespace: media-apps
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: ''
kind: Namespace
namespaceResourceWhitelist:
- group: '*'
kind: '*'