Compare commits
5 Commits
main
...
0cd5446d6b
| Author | SHA1 | Date | |
|---|---|---|---|
| 0cd5446d6b | |||
| f272a1dccb | |||
| b4f3491b18 | |||
| a7a96bd879 | |||
| a4253f09cd |
+12
-12
@@ -1,32 +1,32 @@
|
|||||||
---
|
---
|
||||||
# Second Ceph RGW (S3) bucket owned by the existing jellyfin backup user
|
# Second Ceph RGW (S3) bucket owned by the existing cheeztv backup user
|
||||||
# (cnpg-jellyfin-backup, defined in cnpg_backup.yaml) — one user, two buckets:
|
# (cnpg-cheeztv-backup, defined in cnpg_backup.yaml) — one user, two buckets:
|
||||||
# the CNPG barman bucket plus this one, which k8up uses to hold restic backups
|
# the CNPG barman bucket plus this one, which k8up uses to hold restic backups
|
||||||
# of the jellyfin-config PVC. The BucketAccess emits read-write S3 creds into a
|
# of the cheeztv-config PVC. The BucketAccess emits read-write S3 creds into a
|
||||||
# Secret the k8up Schedule consumes.
|
# Secret the k8up Schedule consumes.
|
||||||
apiVersion: ceph.unkin.net/v1alpha1
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
kind: Bucket
|
kind: Bucket
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-config-backup
|
name: cheeztv-config-backup
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
placementTarget: ec
|
placementTarget: ec
|
||||||
bucketName: jellyfin-config-backup
|
bucketName: cheeztv-config-backup
|
||||||
ownerRef: cnpg-jellyfin-backup
|
ownerRef: cnpg-cheeztv-backup
|
||||||
versioning: false
|
versioning: false
|
||||||
tags:
|
tags:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
purpose: config-backup
|
purpose: config-backup
|
||||||
retainOnDelete: true
|
retainOnDelete: true
|
||||||
---
|
---
|
||||||
apiVersion: ceph.unkin.net/v1alpha1
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
kind: BucketAccess
|
kind: BucketAccess
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-config-backup
|
name: cheeztv-config-backup
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
bucketRef: jellyfin-config-backup
|
bucketRef: cheeztv-config-backup
|
||||||
level: read-write
|
level: read-write
|
||||||
# Operator writes AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (+ S3_ENDPOINT,
|
# Operator writes AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (+ S3_ENDPOINT,
|
||||||
# BUCKET_NAME) into this Secret; the k8up Schedule reads the access keys.
|
# BUCKET_NAME) into this Secret; the k8up Schedule reads the access keys.
|
||||||
secretName: jellyfin-config-backup-s3
|
secretName: cheeztv-config-backup-s3
|
||||||
@@ -1,31 +1,31 @@
|
|||||||
---
|
---
|
||||||
# Ceph RGW (S3) backup target for the jellyfin CNPG cluster, provisioned by the
|
# Ceph RGW (S3) backup target for the cheeztv CNPG cluster, provisioned by the
|
||||||
# in-estate cephrgw-operator: one dedicated bucket + owner user. CNPG reads the
|
# in-estate cephrgw-operator: one dedicated bucket + owner user. CNPG reads the
|
||||||
# S3 credential Secret from its own namespace.
|
# S3 credential Secret from its own namespace.
|
||||||
apiVersion: ceph.unkin.net/v1alpha1
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
kind: ObjectStoreUser
|
kind: ObjectStoreUser
|
||||||
metadata:
|
metadata:
|
||||||
name: cnpg-jellyfin-backup
|
name: cnpg-cheeztv-backup
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
displayName: "CNPG backup owner (jellyfin)"
|
displayName: "CNPG backup owner (cheeztv)"
|
||||||
uid: cnpg-jellyfin-backup
|
uid: cnpg-cheeztv-backup
|
||||||
maxBuckets: 5
|
maxBuckets: 5
|
||||||
secretName: cnpg-jellyfin-backup-s3
|
secretName: cnpg-cheeztv-backup-s3
|
||||||
retainOnDelete: true
|
retainOnDelete: true
|
||||||
---
|
---
|
||||||
apiVersion: ceph.unkin.net/v1alpha1
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
kind: Bucket
|
kind: Bucket
|
||||||
metadata:
|
metadata:
|
||||||
name: cnpg-jellyfin
|
name: cnpg-cheeztv
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
placementTarget: ec
|
placementTarget: ec
|
||||||
bucketName: cnpg-jellyfin
|
bucketName: cnpg-cheeztv
|
||||||
ownerRef: cnpg-jellyfin-backup
|
ownerRef: cnpg-cheeztv-backup
|
||||||
versioning: false
|
versioning: false
|
||||||
tags:
|
tags:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
purpose: cnpg-backup
|
purpose: cnpg-backup
|
||||||
retainOnDelete: true
|
retainOnDelete: true
|
||||||
---
|
---
|
||||||
@@ -34,12 +34,12 @@ spec:
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: ScheduledBackup
|
kind: ScheduledBackup
|
||||||
metadata:
|
metadata:
|
||||||
name: cnpg-jellyfin-nightly
|
name: cnpg-cheeztv-nightly
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
schedule: "0 35 3 * * *"
|
schedule: "0 35 3 * * *"
|
||||||
immediate: false
|
immediate: false
|
||||||
backupOwnerReference: self
|
backupOwnerReference: self
|
||||||
method: barmanObjectStore
|
method: barmanObjectStore
|
||||||
cluster:
|
cluster:
|
||||||
name: jellyfin-postgres
|
name: cheeztv-postgres
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
# Main Jellyfin database. The jellyfin-ha fork's experimental EF Core provider
|
# Main Jellyfin database. The cheeztv-ha fork's experimental EF Core provider
|
||||||
# moves the entire Jellyfin DB (incl. library items) off SQLite into PostgreSQL,
|
# moves the entire Jellyfin DB (incl. library items) off SQLite into PostgreSQL,
|
||||||
# which is what makes a shared-nothing multi-replica deployment possible. No
|
# which is what makes a shared-nothing multi-replica deployment possible. No
|
||||||
# bootstrap secret is given, so CNPG generates the jellyfin-postgres-app secret
|
# bootstrap secret is given, so CNPG generates the cheeztv-postgres-app secret
|
||||||
# (username/password/dbname) that the StatefulSet composes its DSN from.
|
# (username/password/dbname) that the StatefulSet composes its DSN from.
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-postgres
|
name: cheeztv-postgres
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
# Exclude the operator-managed data PVCs (jellyfin-postgres-N) from the
|
# Exclude the operator-managed data PVCs (cheeztv-postgres-N) from the
|
||||||
# jellyfin-config k8up Schedule (skipWithoutAnnotation is false cluster-wide,
|
# cheeztv-config k8up Schedule (skipWithoutAnnotation is false cluster-wide,
|
||||||
# so unannotated PVCs are swept in). Postgres has its own barmanObjectStore
|
# so unannotated PVCs are swept in). Postgres has its own barmanObjectStore
|
||||||
# backup below; restic must not touch the raw RWO data volumes.
|
# backup below; restic must not touch the raw RWO data volumes.
|
||||||
inheritedMetadata:
|
inheritedMetadata:
|
||||||
@@ -23,19 +23,19 @@ spec:
|
|||||||
retentionPolicy: 30d
|
retentionPolicy: 30d
|
||||||
barmanObjectStore:
|
barmanObjectStore:
|
||||||
# Dedicated per-cluster Ceph RGW bucket (cephrgw-operator provisions it).
|
# Dedicated per-cluster Ceph RGW bucket (cephrgw-operator provisions it).
|
||||||
destinationPath: s3://cnpg-jellyfin
|
destinationPath: s3://cnpg-cheeztv
|
||||||
endpointURL: https://s3.ceph.unkin.net
|
endpointURL: https://s3.ceph.unkin.net
|
||||||
endpointCA:
|
endpointCA:
|
||||||
name: vault-ca-cert
|
name: vault-ca-cert
|
||||||
key: ca.crt
|
key: ca.crt
|
||||||
s3Credentials:
|
s3Credentials:
|
||||||
accessKeyId:
|
accessKeyId:
|
||||||
name: cnpg-jellyfin-backup-s3
|
name: cnpg-cheeztv-backup-s3
|
||||||
key: AWS_ACCESS_KEY_ID
|
key: AWS_ACCESS_KEY_ID
|
||||||
secretAccessKey:
|
secretAccessKey:
|
||||||
name: cnpg-jellyfin-backup-s3
|
name: cnpg-cheeztv-backup-s3
|
||||||
key: AWS_SECRET_ACCESS_KEY
|
key: AWS_SECRET_ACCESS_KEY
|
||||||
serverName: jellyfin
|
serverName: cheeztv
|
||||||
data:
|
data:
|
||||||
compression: bzip2
|
compression: bzip2
|
||||||
jobs: 2
|
jobs: 2
|
||||||
@@ -44,11 +44,11 @@ spec:
|
|||||||
maxParallel: 2
|
maxParallel: 2
|
||||||
bootstrap:
|
bootstrap:
|
||||||
initdb:
|
initdb:
|
||||||
database: jellyfin
|
database: cheeztv
|
||||||
encoding: UTF8
|
encoding: UTF8
|
||||||
localeCType: C
|
localeCType: C
|
||||||
localeCollate: C
|
localeCollate: C
|
||||||
owner: jellyfin
|
owner: cheeztv
|
||||||
enablePDB: true
|
enablePDB: true
|
||||||
enableSuperuserAccess: false
|
enableSuperuserAccess: false
|
||||||
failoverDelay: 0
|
failoverDelay: 0
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
---
|
---
|
||||||
# PgBouncer pooler in front of the jellyfin-postgres cluster. Jellyfin connects
|
# PgBouncer pooler in front of the cheeztv-postgres cluster. Jellyfin connects
|
||||||
# here (jellyfin-postgres-pooler:5432) rather than the -rw service so EF Core's
|
# here (cheeztv-postgres-pooler:5432) rather than the -rw service so EF Core's
|
||||||
# connection churn is absorbed by the pool.
|
# connection churn is absorbed by the pool.
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Pooler
|
kind: Pooler
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-postgres-pooler
|
name: cheeztv-postgres-pooler
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
cluster:
|
cluster:
|
||||||
name: jellyfin-postgres
|
name: cheeztv-postgres
|
||||||
instances: 2
|
instances: 2
|
||||||
pgbouncer:
|
pgbouncer:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -20,7 +20,7 @@ spec:
|
|||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: jellyfin-pooler
|
app: cheeztv-pooler
|
||||||
spec:
|
spec:
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
@@ -30,7 +30,7 @@ spec:
|
|||||||
- key: app
|
- key: app
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- jellyfin-pooler
|
- cheeztv-pooler
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
containers: []
|
containers: []
|
||||||
type: rw
|
type: rw
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
---
|
||||||
|
# Friendly public hostname for the kids instance, cheeztv.unkin.net. Same
|
||||||
|
# internal-Traefik + external-dns pattern as logviewer.unkin.net: external-dns
|
||||||
|
# publishes the A record at the internal LB VIP (198.18.200.4) and cert-manager
|
||||||
|
# mints cheeztv-tls (CN cheeztv.unkin.net) off the Vault-PKI cluster issuer.
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
traefik.io/instance: internal
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: vault-issuer
|
||||||
|
cert-manager.io/common-name: cheeztv.unkin.net
|
||||||
|
cert-manager.io/private-key-size: "4096"
|
||||||
|
external-dns.alpha.kubernetes.io/hostname: cheeztv.unkin.net
|
||||||
|
external-dns.alpha.kubernetes.io/target: 198.18.200.4
|
||||||
|
name: cheeztv
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
gatewayClassName: traefik-internal
|
||||||
|
listeners:
|
||||||
|
- allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
|
hostname: cheeztv.unkin.net
|
||||||
|
name: http
|
||||||
|
port: 80
|
||||||
|
protocol: HTTP
|
||||||
|
- allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
|
hostname: cheeztv.unkin.net
|
||||||
|
name: https
|
||||||
|
port: 443
|
||||||
|
protocol: HTTPS
|
||||||
|
tls:
|
||||||
|
certificateRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: cheeztv-tls
|
||||||
|
mode: Terminate
|
||||||
|
---
|
||||||
|
# Cluster hostname variant, mirroring fafflix's jellyfin.k8s.syd1.au.unkin.net
|
||||||
|
# gateway 1:1 (internal Traefik, external-dns at 198.18.200.4). Own cert secret
|
||||||
|
# so each hostname gets its own leaf.
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
traefik.io/instance: internal
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: vault-issuer
|
||||||
|
cert-manager.io/common-name: cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
cert-manager.io/private-key-size: "4096"
|
||||||
|
external-dns.alpha.kubernetes.io/hostname: cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
external-dns.alpha.kubernetes.io/target: 198.18.200.4
|
||||||
|
name: cheeztv-internal
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
gatewayClassName: traefik-internal
|
||||||
|
listeners:
|
||||||
|
- allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
|
hostname: cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
name: http
|
||||||
|
port: 80
|
||||||
|
protocol: HTTP
|
||||||
|
- allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: Same
|
||||||
|
hostname: cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
name: https
|
||||||
|
port: 443
|
||||||
|
protocol: HTTPS
|
||||||
|
tls:
|
||||||
|
certificateRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Secret
|
||||||
|
name: cheeztv-internal-tls
|
||||||
|
mode: Terminate
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: http-redirect
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
hostnames:
|
||||||
|
- cheeztv.unkin.net
|
||||||
|
parentRefs:
|
||||||
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: cheeztv
|
||||||
|
sectionName: http
|
||||||
|
rules:
|
||||||
|
- filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
statusCode: 301
|
||||||
|
matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: cheeztv-route
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
hostnames:
|
||||||
|
- cheeztv.unkin.net
|
||||||
|
parentRefs:
|
||||||
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: cheeztv
|
||||||
|
sectionName: https
|
||||||
|
rules:
|
||||||
|
- backendRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: cheeztv
|
||||||
|
port: 8096
|
||||||
|
weight: 1
|
||||||
|
matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: http-redirect-internal
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
hostnames:
|
||||||
|
- cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
parentRefs:
|
||||||
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: cheeztv-internal
|
||||||
|
sectionName: http
|
||||||
|
rules:
|
||||||
|
- filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
statusCode: 301
|
||||||
|
matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: cheeztv-route-internal
|
||||||
|
namespace: cheeztv
|
||||||
|
spec:
|
||||||
|
hostnames:
|
||||||
|
- cheeztv.k8s.syd1.au.unkin.net
|
||||||
|
parentRefs:
|
||||||
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: cheeztv-internal
|
||||||
|
sectionName: https
|
||||||
|
rules:
|
||||||
|
- backendRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: cheeztv
|
||||||
|
port: 8096
|
||||||
|
weight: 1
|
||||||
|
matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin
|
name: cheeztv
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
apiVersion: policy/v1
|
apiVersion: policy/v1
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin
|
name: cheeztv
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
minAvailable: 1
|
minAvailable: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
# Static PV for the shared MOVIES CephFS subvolume. Same rootPath as arrstack's
|
# Static PV for the shared MOVIES CephFS subvolume. Same rootPath as arrstack's
|
||||||
# movies PV so radarr writes and jellyfin reads the identical library tree; each
|
# movies PV so radarr writes and cheeztv reads the identical library tree; each
|
||||||
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-media-movies
|
name: cheeztv-media-movies
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 1Ti
|
storage: 1Ti
|
||||||
@@ -15,11 +15,11 @@ spec:
|
|||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
claimRef:
|
claimRef:
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
name: jellyfin-media-movies
|
name: cheeztv-media-movies
|
||||||
csi:
|
csi:
|
||||||
driver: cephfs.csi.ceph.com
|
driver: cephfs.csi.ceph.com
|
||||||
volumeHandle: jellyfin-media-movies-static
|
volumeHandle: cheeztv-media-movies-static
|
||||||
nodeStageSecretRef:
|
nodeStageSecretRef:
|
||||||
name: csi-cephfs-secret
|
name: csi-cephfs-secret
|
||||||
namespace: csi-cephfs
|
namespace: csi-cephfs
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
# Static PV for the shared TV CephFS subvolume. Same rootPath as arrstack's
|
# Static PV for the shared TV CephFS subvolume. Same rootPath as arrstack's
|
||||||
# TV PV so sonarr writes and jellyfin reads the identical library tree; each
|
# TV PV so sonarr writes and cheeztv reads the identical library tree; each
|
||||||
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-media-tv
|
name: cheeztv-media-tv
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 1Ti
|
storage: 1Ti
|
||||||
@@ -15,11 +15,11 @@ spec:
|
|||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
claimRef:
|
claimRef:
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
name: jellyfin-media-tv
|
name: cheeztv-media-tv
|
||||||
csi:
|
csi:
|
||||||
driver: cephfs.csi.ceph.com
|
driver: cephfs.csi.ceph.com
|
||||||
volumeHandle: jellyfin-media-tv-static
|
volumeHandle: cheeztv-media-tv-static
|
||||||
nodeStageSecretRef:
|
nodeStageSecretRef:
|
||||||
name: csi-cephfs-secret
|
name: csi-cephfs-secret
|
||||||
namespace: csi-cephfs
|
namespace: csi-cephfs
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
# Jellyfin config: metadata images, plugins, subtitles and config XML. Shared
|
# Jellyfin config: metadata images, plugins, subtitles and config XML. Shared
|
||||||
# ReadWriteMany across replicas (all pods read/write the same library metadata);
|
# ReadWriteMany across replicas (all pods read/write the same library metadata);
|
||||||
# the main library DB now lives in PostgreSQL, not here. Retain — this is state.
|
# the main library DB now lives in PostgreSQL, not here (on CephFS, raid5-delete).
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-config
|
name: cheeztv-config
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 20Gi
|
storage: 20Gi
|
||||||
storageClassName: cephfs-raid5-retain
|
storageClassName: cephfs-raid5-delete
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
# Movie library, shared read-many across replicas. Statically bound to the
|
# Movie library, shared read-many across replicas. Statically bound to the
|
||||||
# jellyfin-media-movies PV (shared CephFS subvolume also used by arrstack/radarr).
|
# cheeztv-media-movies PV (shared CephFS subvolume also used by arrstack/radarr).
|
||||||
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
||||||
# pre-created static PV.
|
# pre-created static PV.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-media-movies
|
name: cheeztv-media-movies
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
annotations:
|
annotations:
|
||||||
# Exclude from the jellyfin-config k8up Schedule (skipWithoutAnnotation is
|
# Exclude from the cheeztv-config k8up Schedule (skipWithoutAnnotation is
|
||||||
# false cluster-wide, so unannotated PVCs are swept in). Only jellyfin-config
|
# false cluster-wide, so unannotated PVCs are swept in). Only cheeztv-config
|
||||||
# is backed up; the media library is not restic-backup material.
|
# is backed up; the media library is not restic-backup material.
|
||||||
k8up.io/backup: "false"
|
k8up.io/backup: "false"
|
||||||
spec:
|
spec:
|
||||||
@@ -20,5 +20,5 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: 1Ti
|
storage: 1Ti
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
volumeName: jellyfin-media-movies
|
volumeName: cheeztv-media-movies
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
# TV library, shared read-many across replicas. Statically bound to the
|
# TV library, shared read-many across replicas. Statically bound to the
|
||||||
# jellyfin-media-tv PV (shared CephFS subvolume also used by arrstack/sonarr).
|
# cheeztv-media-tv PV (shared CephFS subvolume also used by arrstack/sonarr).
|
||||||
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
||||||
# pre-created static PV.
|
# pre-created static PV.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-media-tv
|
name: cheeztv-media-tv
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
annotations:
|
annotations:
|
||||||
# Exclude from the jellyfin-config k8up Schedule (skipWithoutAnnotation is
|
# Exclude from the cheeztv-config k8up Schedule (skipWithoutAnnotation is
|
||||||
# false cluster-wide, so unannotated PVCs are swept in). Only jellyfin-config
|
# false cluster-wide, so unannotated PVCs are swept in). Only cheeztv-config
|
||||||
# is backed up; the media library is not restic-backup material.
|
# is backed up; the media library is not restic-backup material.
|
||||||
k8up.io/backup: "false"
|
k8up.io/backup: "false"
|
||||||
spec:
|
spec:
|
||||||
@@ -20,5 +20,5 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: 1Ti
|
storage: 1Ti
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
volumeName: jellyfin-media-tv
|
volumeName: cheeztv-media-tv
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-transcode
|
name: cheeztv-transcode
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
annotations:
|
annotations:
|
||||||
# Exclude from the jellyfin-config k8up Schedule (skipWithoutAnnotation is
|
# Exclude from the cheeztv-config k8up Schedule (skipWithoutAnnotation is
|
||||||
# false cluster-wide, so unannotated PVCs are swept in). Transcode is RWX
|
# false cluster-wide, so unannotated PVCs are swept in). Transcode is RWX
|
||||||
# scratch — nothing to back up.
|
# scratch — nothing to back up.
|
||||||
k8up.io/backup: "false"
|
k8up.io/backup: "false"
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
# k8up Schedule: restic backups of the jellyfin-config PVC (library metadata,
|
# k8up Schedule: restic backups of the cheeztv-config PVC (library metadata,
|
||||||
# plugins, config XML) to the dedicated Ceph RGW config-backup bucket. S3 creds
|
# plugins, config XML) to the dedicated Ceph RGW config-backup bucket. S3 creds
|
||||||
# come from the cephrgw BucketAccess Secret (jellyfin-config-backup-s3); the
|
# come from the cephrgw BucketAccess Secret (cheeztv-config-backup-s3); the
|
||||||
# restic repo password comes from Vault via the jellyfin-k8up-restic Secret.
|
# restic repo password comes from Vault via the cheeztv-k8up-restic Secret.
|
||||||
#
|
#
|
||||||
# s3.ceph.unkin.net presents the internal unkin.net CA, which the k8up/restic
|
# s3.ceph.unkin.net presents the internal unkin.net CA, which the k8up/restic
|
||||||
# image does not trust by default, so the reflected vault-ca-cert Secret is
|
# image does not trust by default, so the reflected vault-ca-cert Secret is
|
||||||
@@ -10,21 +10,21 @@
|
|||||||
apiVersion: k8up.io/v1
|
apiVersion: k8up.io/v1
|
||||||
kind: Schedule
|
kind: Schedule
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-config
|
name: cheeztv-config
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
backend:
|
backend:
|
||||||
repoPasswordSecretRef:
|
repoPasswordSecretRef:
|
||||||
name: jellyfin-k8up-restic
|
name: cheeztv-k8up-restic
|
||||||
key: password
|
key: password
|
||||||
s3:
|
s3:
|
||||||
endpoint: https://s3.ceph.unkin.net
|
endpoint: https://s3.ceph.unkin.net
|
||||||
bucket: jellyfin-config-backup
|
bucket: cheeztv-config-backup
|
||||||
accessKeyIDSecretRef:
|
accessKeyIDSecretRef:
|
||||||
name: jellyfin-config-backup-s3
|
name: cheeztv-config-backup-s3
|
||||||
key: AWS_ACCESS_KEY_ID
|
key: AWS_ACCESS_KEY_ID
|
||||||
secretAccessKeySecretRef:
|
secretAccessKeySecretRef:
|
||||||
name: jellyfin-config-backup-s3
|
name: cheeztv-config-backup-s3
|
||||||
key: AWS_SECRET_ACCESS_KEY
|
key: AWS_SECRET_ACCESS_KEY
|
||||||
tlsOptions:
|
tlsOptions:
|
||||||
caCert: /etc/k8up/ca/ca.crt
|
caCert: /etc/k8up/ca/ca.crt
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin
|
name: cheeztv
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
internalTrafficPolicy: Cluster
|
internalTrafficPolicy: Cluster
|
||||||
ports:
|
ports:
|
||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: http
|
targetPort: http
|
||||||
selector:
|
selector:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
# Pin each client to one replica to reduce transcode-session churn/takeover.
|
# Pin each client to one replica to reduce transcode-session churn/takeover.
|
||||||
sessionAffinity: ClientIP
|
sessionAffinity: ClientIP
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
@@ -2,24 +2,24 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin
|
name: cheeztv
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
# HA: two replicas coordinate transcode session ownership through Valkey and
|
# HA: two replicas coordinate transcode session ownership through Valkey and
|
||||||
# resume each other's HLS segments off the shared RWX transcode PVC. Stable
|
# resume each other's HLS segments off the shared RWX transcode PVC. Stable
|
||||||
# pod names (jellyfin-0/1) are the lease owner identity, hence StatefulSet.
|
# pod names (cheeztv-0/1) are the lease owner identity, hence StatefulSet.
|
||||||
replicas: 2
|
replicas: 2
|
||||||
serviceName: jellyfin
|
serviceName: cheeztv
|
||||||
podManagementPolicy: Parallel
|
podManagementPolicy: Parallel
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
# Group-write the shared RWX volumes and grant the render/video groups so
|
# Group-write the shared RWX volumes and grant the render/video groups so
|
||||||
@@ -41,7 +41,7 @@ spec:
|
|||||||
podAffinityTerm:
|
podAffinityTerm:
|
||||||
labelSelector:
|
labelSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: jellyfin
|
app: cheeztv
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
initContainers:
|
initContainers:
|
||||||
# Seed the fork's PostgreSQL provider (database.xml) and Intel iGPU
|
# Seed the fork's PostgreSQL provider (database.xml) and Intel iGPU
|
||||||
@@ -110,7 +110,7 @@ spec:
|
|||||||
- name: config
|
- name: config
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
containers:
|
containers:
|
||||||
- name: jellyfin
|
- name: cheeztv
|
||||||
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha:v0.1.3
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha:v0.1.3
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
@@ -137,9 +137,9 @@ spec:
|
|||||||
# Config dir must differ from the data root (Jellyfin sanity check).
|
# Config dir must differ from the data root (Jellyfin sanity check).
|
||||||
- name: JELLYFIN_CONFIG_DIR
|
- name: JELLYFIN_CONFIG_DIR
|
||||||
value: /config/config
|
value: /config/config
|
||||||
# Distributed transcode session store (jellyfin-ha additions).
|
# Distributed transcode session store (cheeztv-ha additions).
|
||||||
- name: Jellyfin__TranscodeStore__RedisConnectionString
|
- name: Jellyfin__TranscodeStore__RedisConnectionString
|
||||||
value: "valkey-jellyfin-valkey:6379,abortConnect=false"
|
value: "valkey-cheeztv-valkey:6379,abortConnect=false"
|
||||||
- name: Jellyfin__TranscodeStore__LeaseDurationSeconds
|
- name: Jellyfin__TranscodeStore__LeaseDurationSeconds
|
||||||
value: "30"
|
value: "30"
|
||||||
# PostgreSQL main DB via the CNPG-generated app secret, routed through
|
# PostgreSQL main DB via the CNPG-generated app secret, routed through
|
||||||
@@ -148,22 +148,22 @@ spec:
|
|||||||
- name: PGUSER
|
- name: PGUSER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: jellyfin-postgres-app
|
name: cheeztv-postgres-app
|
||||||
key: username
|
key: username
|
||||||
- name: PGPASSWORD
|
- name: PGPASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: jellyfin-postgres-app
|
name: cheeztv-postgres-app
|
||||||
key: password
|
key: password
|
||||||
- name: PGDB
|
- name: PGDB
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: jellyfin-postgres-app
|
name: cheeztv-postgres-app
|
||||||
key: dbname
|
key: dbname
|
||||||
- name: POSTGRES_CONNECTION_STRING
|
- name: POSTGRES_CONNECTION_STRING
|
||||||
value: "postgresql://$(PGUSER):$(PGPASSWORD)@jellyfin-postgres-pooler:5432/$(PGDB)"
|
value: "postgresql://$(PGUSER):$(PGPASSWORD)@cheeztv-postgres-pooler:5432/$(PGDB)"
|
||||||
- name: DATABASE_URL
|
- name: DATABASE_URL
|
||||||
value: "postgresql://$(PGUSER):$(PGPASSWORD)@jellyfin-postgres-pooler:5432/$(PGDB)"
|
value: "postgresql://$(PGUSER):$(PGPASSWORD)@cheeztv-postgres-pooler:5432/$(PGDB)"
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
@@ -208,30 +208,38 @@ spec:
|
|||||||
- name: cache
|
- name: cache
|
||||||
mountPath: /cache
|
mountPath: /cache
|
||||||
- name: media-tv
|
- name: media-tv
|
||||||
|
# Kids-only instance: mount just the tvshows/kids subtree of the
|
||||||
|
# shared TV subvolume (subPath kids) so cheeztv's library never
|
||||||
|
# exposes the adult tree. Path matches fafflix's /media/tv/kids
|
||||||
|
# mount so the same episode resolves identically across instances.
|
||||||
mountPath: /media/tv
|
mountPath: /media/tv
|
||||||
|
subPath: kids
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: media-movies
|
- name: media-movies
|
||||||
|
# Kids-only instance: mount just the movies/kids subtree of the
|
||||||
|
# shared movies subvolume (subPath kids).
|
||||||
mountPath: /media/movies
|
mountPath: /media/movies
|
||||||
|
subPath: kids
|
||||||
readOnly: true
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: jellyfin-config
|
claimName: cheeztv-config
|
||||||
- name: transcode
|
- name: transcode
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: jellyfin-transcode
|
claimName: cheeztv-transcode
|
||||||
- name: media-tv
|
- name: media-tv
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: jellyfin-media-tv
|
claimName: cheeztv-media-tv
|
||||||
- name: media-movies
|
- name: media-movies
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: jellyfin-media-movies
|
claimName: cheeztv-media-movies
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
# Per-pod scratch cache — RWO, disposable, one PVC per replica.
|
# Per-pod scratch cache — RWO, disposable, one PVC per replica.
|
||||||
- metadata:
|
- metadata:
|
||||||
name: cache
|
name: cache
|
||||||
annotations:
|
annotations:
|
||||||
# Exclude the per-pod cache PVCs from the jellyfin-config k8up Schedule
|
# Exclude the per-pod cache PVCs from the cheeztv-config k8up Schedule
|
||||||
# (skipWithoutAnnotation is false cluster-wide). Cache is disposable and
|
# (skipWithoutAnnotation is false cluster-wide). Cache is disposable and
|
||||||
# RWO — it would also fail to mount into the backup pod while in use.
|
# RWO — it would also fail to mount into the backup pod while in use.
|
||||||
k8up.io/backup: "false"
|
k8up.io/backup: "false"
|
||||||
@@ -19,20 +19,18 @@
|
|||||||
apiVersion: valkey.io/v1alpha1
|
apiVersion: valkey.io/v1alpha1
|
||||||
kind: ValkeyCluster
|
kind: ValkeyCluster
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-valkey
|
name: cheeztv-valkey
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
shards: 1
|
shards: 1
|
||||||
replicas: 2
|
replicas: 2
|
||||||
image: artifactapi.k8s.syd1.au.unkin.net/dockerhub/valkey/valkey:9.0.0
|
image: docker.io/valkey/valkey:9.0.0
|
||||||
# redis_exporter sidecar (:9121, port name `metrics`) on every ValkeyNode pod;
|
# redis_exporter sidecar (:9121, port name `metrics`) on every ValkeyNode pod;
|
||||||
# the operator manages a dedicated _exporter ACL user for it. Image overridden
|
# the operator manages a dedicated _exporter ACL user for it. Image version
|
||||||
# from the operator default (bare dockerhub oliver006/redis_exporter:v1.80.0)
|
# pinned; scraped by valkey-exporter VMPodScrape in vmpodscrape.yaml.
|
||||||
# to the artifactapi-proxied pin. Scraped by the valkey-exporter VMPodScrape
|
|
||||||
# in vmpodscrape.yaml alongside this file.
|
|
||||||
exporter:
|
exporter:
|
||||||
enabled: true
|
enabled: true
|
||||||
image: artifactapi.k8s.syd1.au.unkin.net/dockerhub/oliver006/redis_exporter:v1.89.0
|
image: docker.io/oliver006/redis_exporter:v1.89.0
|
||||||
scheduling:
|
scheduling:
|
||||||
node:
|
node:
|
||||||
spread:
|
spread:
|
||||||
@@ -3,12 +3,12 @@ apiVersion: secrets.hashicorp.com/v1beta1
|
|||||||
kind: VaultAuth
|
kind: VaultAuth
|
||||||
metadata:
|
metadata:
|
||||||
name: default
|
name: default
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "0"
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
spec:
|
spec:
|
||||||
allowedNamespaces:
|
allowedNamespaces:
|
||||||
- jellyfin
|
- cheeztv
|
||||||
kubernetes:
|
kubernetes:
|
||||||
audiences:
|
audiences:
|
||||||
- vault
|
- vault
|
||||||
+7
-7
@@ -1,24 +1,24 @@
|
|||||||
---
|
---
|
||||||
# restic repository password for the k8up jellyfin-config backups. Seeded at
|
# restic repository password for the k8up cheeztv-config backups. Seeded at
|
||||||
# kv/kubernetes/namespace/jellyfin/default/k8up-restic (key: password); the
|
# kv/kubernetes/namespace/cheeztv/default/k8up-restic (key: password); the
|
||||||
# default k8s role's templated policy already grants read here, so no
|
# default k8s role's templated policy already grants read here, so no
|
||||||
# terraform-vault change is needed. VSO syncs it into the jellyfin-k8up-restic
|
# terraform-vault change is needed. VSO syncs it into the cheeztv-k8up-restic
|
||||||
# Secret that the Schedule references via backend.repoPasswordSecretRef.
|
# Secret that the Schedule references via backend.repoPasswordSecretRef.
|
||||||
apiVersion: secrets.hashicorp.com/v1beta1
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
kind: VaultStaticSecret
|
kind: VaultStaticSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-k8up-restic
|
name: cheeztv-k8up-restic
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "0"
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
spec:
|
spec:
|
||||||
destination:
|
destination:
|
||||||
create: true
|
create: true
|
||||||
name: jellyfin-k8up-restic
|
name: cheeztv-k8up-restic
|
||||||
overwrite: true
|
overwrite: true
|
||||||
hmacSecretData: true
|
hmacSecretData: true
|
||||||
mount: kv
|
mount: kv
|
||||||
path: kubernetes/namespace/jellyfin/default/k8up-restic
|
path: kubernetes/namespace/cheeztv/default/k8up-restic
|
||||||
refreshAfter: 5m
|
refreshAfter: 5m
|
||||||
type: kv-v2
|
type: kv-v2
|
||||||
vaultAuthRef: default
|
vaultAuthRef: default
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Scrape the operator-injected redis_exporter sidecar (:9121, port name
|
# Scrape the operator-injected redis_exporter sidecar (:9121, port name
|
||||||
# `metrics`) on the jellyfin-valkey ValkeyNode pods. The valkey-operator gives
|
# `metrics`) on the cheeztv-valkey ValkeyNode pods. The valkey-operator gives
|
||||||
# its pods fixed labels only (no pod-label passthrough on the ValkeyCluster CR),
|
# its pods fixed labels only (no pod-label passthrough on the ValkeyCluster CR),
|
||||||
# so select on the operator-managed labels. Picked up by the observability
|
# so select on the operator-managed labels. Picked up by the observability
|
||||||
# VMAgent (selectAllByDefault).
|
# VMAgent (selectAllByDefault).
|
||||||
@@ -8,7 +8,7 @@ apiVersion: operator.victoriametrics.com/v1beta1
|
|||||||
kind: VMPodScrape
|
kind: VMPodScrape
|
||||||
metadata:
|
metadata:
|
||||||
name: valkey-exporter
|
name: valkey-exporter
|
||||||
namespace: jellyfin
|
namespace: cheeztv
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
# Second Ceph RGW (S3) bucket owned by the existing fafflix backup user
|
||||||
|
# (cnpg-fafflix-backup, defined in cnpg_backup.yaml) — one user, two buckets:
|
||||||
|
# the CNPG barman bucket plus this one, which k8up uses to hold restic backups
|
||||||
|
# of the fafflix-config PVC. The BucketAccess emits read-write S3 creds into a
|
||||||
|
# Secret the k8up Schedule consumes.
|
||||||
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
|
kind: Bucket
|
||||||
|
metadata:
|
||||||
|
name: fafflix-config-backup
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
placementTarget: ec
|
||||||
|
bucketName: fafflix-config-backup
|
||||||
|
ownerRef: cnpg-fafflix-backup
|
||||||
|
versioning: false
|
||||||
|
tags:
|
||||||
|
app: fafflix
|
||||||
|
purpose: config-backup
|
||||||
|
retainOnDelete: true
|
||||||
|
---
|
||||||
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
|
kind: BucketAccess
|
||||||
|
metadata:
|
||||||
|
name: fafflix-config-backup
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
bucketRef: fafflix-config-backup
|
||||||
|
level: read-write
|
||||||
|
# Operator writes AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (+ S3_ENDPOINT,
|
||||||
|
# BUCKET_NAME) into this Secret; the k8up Schedule reads the access keys.
|
||||||
|
secretName: fafflix-config-backup-s3
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
# Ceph RGW (S3) backup target for the fafflix CNPG cluster, provisioned by the
|
||||||
|
# in-estate cephrgw-operator: one dedicated bucket + owner user. CNPG reads the
|
||||||
|
# S3 credential Secret from its own namespace.
|
||||||
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
|
kind: ObjectStoreUser
|
||||||
|
metadata:
|
||||||
|
name: cnpg-fafflix-backup
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
displayName: "CNPG backup owner (fafflix)"
|
||||||
|
uid: cnpg-fafflix-backup
|
||||||
|
maxBuckets: 5
|
||||||
|
secretName: cnpg-fafflix-backup-s3
|
||||||
|
retainOnDelete: true
|
||||||
|
---
|
||||||
|
apiVersion: ceph.unkin.net/v1alpha1
|
||||||
|
kind: Bucket
|
||||||
|
metadata:
|
||||||
|
name: cnpg-fafflix
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
placementTarget: ec
|
||||||
|
bucketName: cnpg-fafflix
|
||||||
|
ownerRef: cnpg-fafflix-backup
|
||||||
|
versioning: false
|
||||||
|
tags:
|
||||||
|
app: fafflix
|
||||||
|
purpose: cnpg-backup
|
||||||
|
retainOnDelete: true
|
||||||
|
---
|
||||||
|
# Nightly base backup on top of always-on WAL archiving. Scheduled off-peak and
|
||||||
|
# staggered from the other CNPG clusters (6-field cron, seconds first).
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: cnpg-fafflix-nightly
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
schedule: "0 35 3 * * *"
|
||||||
|
immediate: false
|
||||||
|
backupOwnerReference: self
|
||||||
|
method: barmanObjectStore
|
||||||
|
cluster:
|
||||||
|
name: fafflix-postgres
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
---
|
||||||
|
# Main Jellyfin database. The fafflix-ha fork's experimental EF Core provider
|
||||||
|
# moves the entire Jellyfin DB (incl. library items) off SQLite into PostgreSQL,
|
||||||
|
# which is what makes a shared-nothing multi-replica deployment possible. No
|
||||||
|
# bootstrap secret is given, so CNPG generates the fafflix-postgres-app secret
|
||||||
|
# (username/password/dbname) that the StatefulSet composes its DSN from.
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: fafflix-postgres
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
# Exclude the operator-managed data PVCs (fafflix-postgres-N) from the
|
||||||
|
# fafflix-config k8up Schedule (skipWithoutAnnotation is false cluster-wide,
|
||||||
|
# so unannotated PVCs are swept in). Postgres has its own barmanObjectStore
|
||||||
|
# backup below; restic must not touch the raw RWO data volumes.
|
||||||
|
inheritedMetadata:
|
||||||
|
annotations:
|
||||||
|
k8up.io/backup: "false"
|
||||||
|
affinity:
|
||||||
|
podAntiAffinityType: preferred
|
||||||
|
backup:
|
||||||
|
retentionPolicy: 30d
|
||||||
|
barmanObjectStore:
|
||||||
|
# Dedicated per-cluster Ceph RGW bucket (cephrgw-operator provisions it).
|
||||||
|
destinationPath: s3://cnpg-fafflix
|
||||||
|
endpointURL: https://s3.ceph.unkin.net
|
||||||
|
endpointCA:
|
||||||
|
name: vault-ca-cert
|
||||||
|
key: ca.crt
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: cnpg-fafflix-backup-s3
|
||||||
|
key: AWS_ACCESS_KEY_ID
|
||||||
|
secretAccessKey:
|
||||||
|
name: cnpg-fafflix-backup-s3
|
||||||
|
key: AWS_SECRET_ACCESS_KEY
|
||||||
|
serverName: fafflix
|
||||||
|
data:
|
||||||
|
compression: bzip2
|
||||||
|
jobs: 2
|
||||||
|
wal:
|
||||||
|
compression: zstd
|
||||||
|
maxParallel: 2
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: fafflix
|
||||||
|
encoding: UTF8
|
||||||
|
localeCType: C
|
||||||
|
localeCollate: C
|
||||||
|
owner: fafflix
|
||||||
|
enablePDB: true
|
||||||
|
enableSuperuserAccess: false
|
||||||
|
failoverDelay: 0
|
||||||
|
# PG 17 — accepted by the fork's Npgsql/EF Core provider (needs PG14+); the
|
||||||
|
# provider generates its own migrations on first start.
|
||||||
|
imageName: ghcr.io/cloudnative-pg/postgresql:17-system-trixie
|
||||||
|
instances: 3
|
||||||
|
logLevel: info
|
||||||
|
maxSyncReplicas: 0
|
||||||
|
minSyncReplicas: 0
|
||||||
|
monitoring:
|
||||||
|
customQueriesConfigMap:
|
||||||
|
- key: queries
|
||||||
|
name: cnpg-default-monitoring
|
||||||
|
disableDefaultQueries: false
|
||||||
|
enablePodMonitor: false
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
archive_mode: "on"
|
||||||
|
archive_timeout: 5min
|
||||||
|
dynamic_shared_memory_type: posix
|
||||||
|
effective_cache_size: 256MB
|
||||||
|
full_page_writes: "on"
|
||||||
|
log_destination: csvlog
|
||||||
|
log_directory: /controller/log
|
||||||
|
log_filename: postgres
|
||||||
|
log_rotation_age: "0"
|
||||||
|
log_rotation_size: "0"
|
||||||
|
log_truncate_on_rotation: "false"
|
||||||
|
logging_collector: "on"
|
||||||
|
max_connections: "200"
|
||||||
|
max_parallel_workers: "16"
|
||||||
|
max_replication_slots: "16"
|
||||||
|
max_worker_processes: "16"
|
||||||
|
shared_buffers: 128MB
|
||||||
|
shared_memory_type: mmap
|
||||||
|
ssl_max_protocol_version: TLSv1.3
|
||||||
|
ssl_min_protocol_version: TLSv1.3
|
||||||
|
wal_keep_size: 256MB
|
||||||
|
wal_level: logical
|
||||||
|
wal_log_hints: "on"
|
||||||
|
wal_receiver_timeout: 5s
|
||||||
|
wal_sender_timeout: 5s
|
||||||
|
syncReplicaElectionConstraint:
|
||||||
|
enabled: false
|
||||||
|
primaryUpdateMethod: restart
|
||||||
|
primaryUpdateStrategy: unsupervised
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
isolationCheck:
|
||||||
|
connectionTimeout: 1000
|
||||||
|
enabled: true
|
||||||
|
requestTimeout: 1000
|
||||||
|
replicationSlots:
|
||||||
|
highAvailability:
|
||||||
|
enabled: true
|
||||||
|
slotPrefix: _cnpg_
|
||||||
|
synchronizeReplicas:
|
||||||
|
enabled: true
|
||||||
|
updateInterval: 30
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 512Mi
|
||||||
|
smartShutdownTimeout: 180
|
||||||
|
startDelay: 3600
|
||||||
|
stopDelay: 1800
|
||||||
|
storage:
|
||||||
|
resizeInUseVolumes: true
|
||||||
|
size: 10Gi
|
||||||
|
storageClass: cephrbd-fast-delete
|
||||||
|
switchoverDelay: 3600
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
# PgBouncer pooler in front of the fafflix-postgres cluster. Jellyfin connects
|
||||||
|
# here (fafflix-postgres-pooler:5432) rather than the -rw service so EF Core's
|
||||||
|
# connection churn is absorbed by the pool.
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Pooler
|
||||||
|
metadata:
|
||||||
|
name: fafflix-postgres-pooler
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
cluster:
|
||||||
|
name: fafflix-postgres
|
||||||
|
instances: 2
|
||||||
|
pgbouncer:
|
||||||
|
parameters:
|
||||||
|
default_pool_size: "50"
|
||||||
|
max_client_conn: "200"
|
||||||
|
paused: false
|
||||||
|
poolMode: session
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fafflix-pooler
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- fafflix-pooler
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
containers: []
|
||||||
|
type: rw
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
# Fafflix (adult instance) keeps serving the legacy jellyfin hostname
|
||||||
|
# (jellyfin.k8s.syd1.au.unkin.net) so the switch to a dedicated fafflix domain
|
||||||
|
# can be deferred. Same internal-Traefik + external-dns pattern the old jellyfin app
|
||||||
|
# used: external-dns publishes the A record at the internal LB VIP
|
||||||
|
# (198.18.200.4) and cert-manager mints fafflix-tls off the Vault-PKI issuer.
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: Gateway
|
kind: Gateway
|
||||||
metadata:
|
metadata:
|
||||||
@@ -10,8 +15,8 @@ metadata:
|
|||||||
cert-manager.io/private-key-size: "4096"
|
cert-manager.io/private-key-size: "4096"
|
||||||
external-dns.alpha.kubernetes.io/hostname: jellyfin.k8s.syd1.au.unkin.net
|
external-dns.alpha.kubernetes.io/hostname: jellyfin.k8s.syd1.au.unkin.net
|
||||||
external-dns.alpha.kubernetes.io/target: 198.18.200.4
|
external-dns.alpha.kubernetes.io/target: 198.18.200.4
|
||||||
name: jellyfin
|
name: fafflix
|
||||||
namespace: jellyfin
|
namespace: fafflix
|
||||||
spec:
|
spec:
|
||||||
gatewayClassName: traefik-internal
|
gatewayClassName: traefik-internal
|
||||||
listeners:
|
listeners:
|
||||||
@@ -33,5 +38,5 @@ spec:
|
|||||||
certificateRefs:
|
certificateRefs:
|
||||||
- group: ""
|
- group: ""
|
||||||
kind: Secret
|
kind: Secret
|
||||||
name: jellyfin-tls
|
name: fafflix-tls
|
||||||
mode: Terminate
|
mode: Terminate
|
||||||
@@ -3,14 +3,14 @@ apiVersion: gateway.networking.k8s.io/v1
|
|||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: http-redirect
|
name: http-redirect
|
||||||
namespace: jellyfin
|
namespace: fafflix
|
||||||
spec:
|
spec:
|
||||||
hostnames:
|
hostnames:
|
||||||
- jellyfin.k8s.syd1.au.unkin.net
|
- jellyfin.k8s.syd1.au.unkin.net
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- group: gateway.networking.k8s.io
|
- group: gateway.networking.k8s.io
|
||||||
kind: Gateway
|
kind: Gateway
|
||||||
name: jellyfin
|
name: fafflix
|
||||||
sectionName: http
|
sectionName: http
|
||||||
rules:
|
rules:
|
||||||
- filters:
|
- filters:
|
||||||
@@ -26,21 +26,21 @@ spec:
|
|||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: jellyfin-route
|
name: fafflix-route
|
||||||
namespace: jellyfin
|
namespace: fafflix
|
||||||
spec:
|
spec:
|
||||||
hostnames:
|
hostnames:
|
||||||
- jellyfin.k8s.syd1.au.unkin.net
|
- jellyfin.k8s.syd1.au.unkin.net
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- group: gateway.networking.k8s.io
|
- group: gateway.networking.k8s.io
|
||||||
kind: Gateway
|
kind: Gateway
|
||||||
name: jellyfin
|
name: fafflix
|
||||||
sectionName: https
|
sectionName: https
|
||||||
rules:
|
rules:
|
||||||
- backendRefs:
|
- backendRefs:
|
||||||
- group: ""
|
- group: ""
|
||||||
kind: Service
|
kind: Service
|
||||||
name: jellyfin
|
name: fafflix
|
||||||
port: 8096
|
port: 8096
|
||||||
weight: 1
|
weight: 1
|
||||||
matches:
|
matches:
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- cnpg_cluster.yaml
|
||||||
|
- cnpg_pooler.yaml
|
||||||
|
- cnpg_backup.yaml
|
||||||
|
- cephrgw-config-backup.yaml
|
||||||
|
- vaultauth.yaml
|
||||||
|
- vaultstaticsecret.yaml
|
||||||
|
- schedule.yaml
|
||||||
|
- pvc-config.yaml
|
||||||
|
- pvc-transcode.yaml
|
||||||
|
- pv-media-tv.yaml
|
||||||
|
- pv-media-movies.yaml
|
||||||
|
- pvc-media-tv.yaml
|
||||||
|
- pvc-media-movies.yaml
|
||||||
|
- statefulset.yaml
|
||||||
|
- pdb.yaml
|
||||||
|
- service.yaml
|
||||||
|
- valkey.yaml
|
||||||
|
- vmpodscrape.yaml
|
||||||
|
- gateway.yaml
|
||||||
|
- httproute.yaml
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: fafflix
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Keep at least one Jellyfin replica serving through voluntary disruptions
|
||||||
|
# (node drains, rollouts) so active streams can fail over rather than drop.
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: fafflix
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
minAvailable: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: fafflix
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
# Static PV for the shared MOVIES CephFS subvolume. Same rootPath as arrstack's
|
||||||
|
# movies PV so radarr writes and fafflix reads the identical library tree; each
|
||||||
|
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: fafflix-media-movies
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 1Ti
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: ""
|
||||||
|
volumeMode: Filesystem
|
||||||
|
claimRef:
|
||||||
|
namespace: fafflix
|
||||||
|
name: fafflix-media-movies
|
||||||
|
csi:
|
||||||
|
driver: cephfs.csi.ceph.com
|
||||||
|
volumeHandle: fafflix-media-movies-static
|
||||||
|
nodeStageSecretRef:
|
||||||
|
name: csi-cephfs-secret
|
||||||
|
namespace: csi-cephfs
|
||||||
|
volumeAttributes:
|
||||||
|
staticVolume: "true"
|
||||||
|
clusterID: cephfs_csi_ssd_ec_4_1
|
||||||
|
fsName: cephfs
|
||||||
|
rootPath: /volumes/csi_ssd_ec_4_1/media-movies/e95d8ace-c736-465a-acc3-0c3e46dcede9
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
# Static PV for the shared TV CephFS subvolume. Same rootPath as arrstack's
|
||||||
|
# TV PV so sonarr writes and fafflix reads the identical library tree; each
|
||||||
|
# namespace gets its own PV (unique name + volumeHandle) pinned by claimRef.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: fafflix-media-tv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 1Ti
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: ""
|
||||||
|
volumeMode: Filesystem
|
||||||
|
claimRef:
|
||||||
|
namespace: fafflix
|
||||||
|
name: fafflix-media-tv
|
||||||
|
csi:
|
||||||
|
driver: cephfs.csi.ceph.com
|
||||||
|
volumeHandle: fafflix-media-tv-static
|
||||||
|
nodeStageSecretRef:
|
||||||
|
name: csi-cephfs-secret
|
||||||
|
namespace: csi-cephfs
|
||||||
|
volumeAttributes:
|
||||||
|
staticVolume: "true"
|
||||||
|
clusterID: cephfs_csi_ssd_ec_4_1
|
||||||
|
fsName: cephfs
|
||||||
|
rootPath: /volumes/csi_ssd_ec_4_1/media-tv/4692957d-f5df-4f72-b9c9-56e4ee6d1333
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
# Jellyfin config: metadata images, plugins, subtitles and config XML. Shared
|
||||||
|
# ReadWriteMany across replicas (all pods read/write the same library metadata);
|
||||||
|
# the main library DB now lives in PostgreSQL, not here (on CephFS, raid5-delete).
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: fafflix-config
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
storageClassName: cephfs-raid5-delete
|
||||||
|
volumeMode: Filesystem
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
# Movie library, shared read-many across replicas. Statically bound to the
|
||||||
|
# fafflix-media-movies PV (shared CephFS subvolume also used by arrstack/radarr).
|
||||||
|
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
||||||
|
# pre-created static PV.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: fafflix-media-movies
|
||||||
|
namespace: fafflix
|
||||||
|
annotations:
|
||||||
|
# Exclude from the fafflix-config k8up Schedule (skipWithoutAnnotation is
|
||||||
|
# false cluster-wide, so unannotated PVCs are swept in). Only fafflix-config
|
||||||
|
# is backed up; the media library is not restic-backup material.
|
||||||
|
k8up.io/backup: "false"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Ti
|
||||||
|
storageClassName: ""
|
||||||
|
volumeName: fafflix-media-movies
|
||||||
|
volumeMode: Filesystem
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
# TV library, shared read-many across replicas. Statically bound to the
|
||||||
|
# fafflix-media-tv PV (shared CephFS subvolume also used by arrstack/sonarr).
|
||||||
|
# storageClassName "" + volumeName disables dynamic provisioning and binds the
|
||||||
|
# pre-created static PV.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: fafflix-media-tv
|
||||||
|
namespace: fafflix
|
||||||
|
annotations:
|
||||||
|
# Exclude from the fafflix-config k8up Schedule (skipWithoutAnnotation is
|
||||||
|
# false cluster-wide, so unannotated PVCs are swept in). Only fafflix-config
|
||||||
|
# is backed up; the media library is not restic-backup material.
|
||||||
|
k8up.io/backup: "false"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Ti
|
||||||
|
storageClassName: ""
|
||||||
|
volumeName: fafflix-media-tv
|
||||||
|
volumeMode: Filesystem
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
# Shared transcode scratch. ReadWriteMany is the hard requirement for the HA
|
||||||
|
# fork: a taking-over pod must read the in-flight HLS segments written by the
|
||||||
|
# pod it replaces. Scratch data (delete reclaim); raid5 avoids the raid6
|
||||||
|
# double-parity write penalty on the many small HLS segment writes.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: fafflix-transcode
|
||||||
|
namespace: fafflix
|
||||||
|
annotations:
|
||||||
|
# Exclude from the fafflix-config k8up Schedule (skipWithoutAnnotation is
|
||||||
|
# false cluster-wide, so unannotated PVCs are swept in). Transcode is RWX
|
||||||
|
# scratch — nothing to back up.
|
||||||
|
k8up.io/backup: "false"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
storageClassName: cephfs-raid5-delete
|
||||||
|
volumeMode: Filesystem
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
# k8up Schedule: restic backups of the fafflix-config PVC (library metadata,
|
||||||
|
# plugins, config XML) to the dedicated Ceph RGW config-backup bucket. S3 creds
|
||||||
|
# come from the cephrgw BucketAccess Secret (fafflix-config-backup-s3); the
|
||||||
|
# restic repo password comes from Vault via the fafflix-k8up-restic Secret.
|
||||||
|
#
|
||||||
|
# s3.ceph.unkin.net presents the internal unkin.net CA, which the k8up/restic
|
||||||
|
# image does not trust by default, so the reflected vault-ca-cert Secret is
|
||||||
|
# mounted into every job pod and pointed at via backend.tlsOptions.caCert.
|
||||||
|
apiVersion: k8up.io/v1
|
||||||
|
kind: Schedule
|
||||||
|
metadata:
|
||||||
|
name: fafflix-config
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
backend:
|
||||||
|
repoPasswordSecretRef:
|
||||||
|
name: fafflix-k8up-restic
|
||||||
|
key: password
|
||||||
|
s3:
|
||||||
|
endpoint: https://s3.ceph.unkin.net
|
||||||
|
bucket: fafflix-config-backup
|
||||||
|
accessKeyIDSecretRef:
|
||||||
|
name: fafflix-config-backup-s3
|
||||||
|
key: AWS_ACCESS_KEY_ID
|
||||||
|
secretAccessKeySecretRef:
|
||||||
|
name: fafflix-config-backup-s3
|
||||||
|
key: AWS_SECRET_ACCESS_KEY
|
||||||
|
tlsOptions:
|
||||||
|
caCert: /etc/k8up/ca/ca.crt
|
||||||
|
volumeMounts:
|
||||||
|
- name: vault-ca
|
||||||
|
mountPath: /etc/k8up/ca
|
||||||
|
readOnly: true
|
||||||
|
backup:
|
||||||
|
schedule: "0 2 * * *"
|
||||||
|
failedJobsHistoryLimit: 3
|
||||||
|
successfulJobsHistoryLimit: 3
|
||||||
|
volumes:
|
||||||
|
- name: vault-ca
|
||||||
|
secret:
|
||||||
|
secretName: vault-ca-cert
|
||||||
|
prune:
|
||||||
|
schedule: "0 3 * * 0"
|
||||||
|
retention:
|
||||||
|
keepDaily: 14
|
||||||
|
keepWeekly: 8
|
||||||
|
keepMonthly: 12
|
||||||
|
volumes:
|
||||||
|
- name: vault-ca
|
||||||
|
secret:
|
||||||
|
secretName: vault-ca-cert
|
||||||
|
check:
|
||||||
|
schedule: "0 4 * * 0"
|
||||||
|
volumes:
|
||||||
|
- name: vault-ca
|
||||||
|
secret:
|
||||||
|
secretName: vault-ca-cert
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fafflix
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
internalTrafficPolicy: Cluster
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8096
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
selector:
|
||||||
|
app: fafflix
|
||||||
|
# Pin each client to one replica to reduce transcode-session churn/takeover.
|
||||||
|
sessionAffinity: ClientIP
|
||||||
|
type: ClusterIP
|
||||||
@@ -0,0 +1,267 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: fafflix
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
# HA: two replicas coordinate transcode session ownership through Valkey and
|
||||||
|
# resume each other's HLS segments off the shared RWX transcode PVC. Stable
|
||||||
|
# pod names (fafflix-0/1) are the lease owner identity, hence StatefulSet.
|
||||||
|
replicas: 2
|
||||||
|
serviceName: fafflix
|
||||||
|
podManagementPolicy: Parallel
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: fafflix
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fafflix
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
# Group-write the shared RWX volumes and grant the render/video groups so
|
||||||
|
# the runAsUser 1000 process can open the Intel DRI render node injected
|
||||||
|
# by the device plugin.
|
||||||
|
fsGroup: 1000
|
||||||
|
supplementalGroups:
|
||||||
|
- 44
|
||||||
|
- 105
|
||||||
|
- 109
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
affinity:
|
||||||
|
# Spread the two replicas across nodes for node-level HA. Soft so a
|
||||||
|
# single-GPU-node cluster still schedules both (i915 has 4 shared slots).
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: fafflix
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
initContainers:
|
||||||
|
# Seed the fork's PostgreSQL provider (database.xml) and Intel iGPU
|
||||||
|
# hardware transcode settings (encoding.xml) before Jellyfin starts.
|
||||||
|
# Runs as root to chown into the shared config volume; mirrors the fork
|
||||||
|
# Helm chart's inject-db-config. Each file is written only when absent so
|
||||||
|
# admin changes persisted to the shared RWX /config survive pod restarts.
|
||||||
|
- name: inject-config
|
||||||
|
image: busybox:1.37.0
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
mkdir -p /config/config
|
||||||
|
chown 1000:1000 /config/config
|
||||||
|
chmod 775 /config/config
|
||||||
|
if [ ! -e /config/config/database.xml ]; then
|
||||||
|
cat > /config/config/database.xml << 'DBEOF'
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<DatabaseConfigurationOptions>
|
||||||
|
<DatabaseType>Jellyfin-PostgreSQL</DatabaseType>
|
||||||
|
<LockingBehavior>NoLock</LockingBehavior>
|
||||||
|
</DatabaseConfigurationOptions>
|
||||||
|
DBEOF
|
||||||
|
chown 1000:1000 /config/config/database.xml
|
||||||
|
chmod 664 /config/config/database.xml
|
||||||
|
fi
|
||||||
|
# VAAPI on the Intel render node the device plugin injects
|
||||||
|
# (/dev/dri/renderD128 — ffmpeg's default DRM node, reachable via
|
||||||
|
# the render/video supplementalGroups). Without this the attached
|
||||||
|
# iGPU is idle and every transcode runs in software. Omitted
|
||||||
|
# elements fall back to the fork's EncodingOptions defaults.
|
||||||
|
if [ ! -e /config/config/encoding.xml ]; then
|
||||||
|
cat > /config/config/encoding.xml << 'ENCEOF'
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<EncodingOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<EncodingThreadCount>-1</EncodingThreadCount>
|
||||||
|
<HardwareAccelerationType>vaapi</HardwareAccelerationType>
|
||||||
|
<VaapiDevice>/dev/dri/renderD128</VaapiDevice>
|
||||||
|
<EnableHardwareEncoding>true</EnableHardwareEncoding>
|
||||||
|
<AllowHevcEncoding>true</AllowHevcEncoding>
|
||||||
|
<AllowAv1Encoding>false</AllowAv1Encoding>
|
||||||
|
<EnableIntelLowPowerH264HwEncoder>false</EnableIntelLowPowerH264HwEncoder>
|
||||||
|
<EnableIntelLowPowerHevcHwEncoder>false</EnableIntelLowPowerHevcHwEncoder>
|
||||||
|
<EnableTonemapping>false</EnableTonemapping>
|
||||||
|
<EnableVppTonemapping>false</EnableVppTonemapping>
|
||||||
|
<HardwareDecodingCodecs>
|
||||||
|
<string>h264</string>
|
||||||
|
<string>hevc</string>
|
||||||
|
<string>vc1</string>
|
||||||
|
<string>vp9</string>
|
||||||
|
</HardwareDecodingCodecs>
|
||||||
|
</EncodingOptions>
|
||||||
|
ENCEOF
|
||||||
|
chown 1000:1000 /config/config/encoding.xml
|
||||||
|
chmod 664 /config/config/encoding.xml
|
||||||
|
fi
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 32Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 64Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
containers:
|
||||||
|
- name: fafflix
|
||||||
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha:v0.1.3
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8096
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
# Pod identity for the Valkey transcode lease owner. The fork reads
|
||||||
|
# JELLYFIN_INSTANCE_ID (falling back to MachineName); the stable
|
||||||
|
# StatefulSet pod name gives each replica a unique lease identity so
|
||||||
|
# takeover can target a dead replica. JELLYFIN_HA_POD_NAME is set for
|
||||||
|
# parity with the fork Helm chart (nothing currently reads it).
|
||||||
|
- name: JELLYFIN_INSTANCE_ID
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: JELLYFIN_HA_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
# Multiple replicas must not each answer UDP auto-discovery.
|
||||||
|
- name: JELLYFIN_Network__AutoDiscovery
|
||||||
|
value: "false"
|
||||||
|
# Config dir must differ from the data root (Jellyfin sanity check).
|
||||||
|
- name: JELLYFIN_CONFIG_DIR
|
||||||
|
value: /config/config
|
||||||
|
# Distributed transcode session store (fafflix-ha additions).
|
||||||
|
- name: Jellyfin__TranscodeStore__RedisConnectionString
|
||||||
|
value: "valkey-fafflix-valkey:6379,abortConnect=false"
|
||||||
|
- name: Jellyfin__TranscodeStore__LeaseDurationSeconds
|
||||||
|
value: "30"
|
||||||
|
# PostgreSQL main DB via the CNPG-generated app secret, routed through
|
||||||
|
# the PgBouncer pooler. Composed with $(VAR) expansion so the password
|
||||||
|
# is never rendered into the manifest; CNPG passwords are URL-safe.
|
||||||
|
- name: PGUSER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: fafflix-postgres-app
|
||||||
|
key: username
|
||||||
|
- name: PGPASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: fafflix-postgres-app
|
||||||
|
key: password
|
||||||
|
- name: PGDB
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: fafflix-postgres-app
|
||||||
|
key: dbname
|
||||||
|
- name: POSTGRES_CONNECTION_STRING
|
||||||
|
value: "postgresql://$(PGUSER):$(PGPASSWORD)@fafflix-postgres-pooler:5432/$(PGDB)"
|
||||||
|
- name: DATABASE_URL
|
||||||
|
value: "postgresql://$(PGUSER):$(PGPASSWORD)@fafflix-postgres-pooler:5432/$(PGDB)"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
gpu.intel.com/i915: "1"
|
||||||
|
limits:
|
||||||
|
cpu: "4"
|
||||||
|
memory: 6Gi
|
||||||
|
# Intel iGPU (QSV/VA-API) slot. Requesting it pins the pod to a
|
||||||
|
# GPU-labelled node and injects /dev/dri/renderD* automatically, so
|
||||||
|
# no /dev/dri hostPath or privileged container is needed. VA-API is
|
||||||
|
# pre-enabled via the seeded encoding.xml (see inject-config), so
|
||||||
|
# transcodes use the iGPU on first boot with no manual UI step.
|
||||||
|
gpu.intel.com/i915: "1"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
- name: transcode
|
||||||
|
# Fork's real transcode temp path. RWX so a surviving pod reads the
|
||||||
|
# in-flight .ts/.m3u8 segments of the pod it takes over. A per-pod
|
||||||
|
# volume here silently breaks HA takeover.
|
||||||
|
mountPath: /config/transcodes
|
||||||
|
- name: cache
|
||||||
|
mountPath: /cache
|
||||||
|
- name: media-tv
|
||||||
|
# Adult instance: mount the tvshows/adult subtree of the shared TV
|
||||||
|
# subvolume (subPath adult) as fafflix's primary TV library. Same
|
||||||
|
# rootPath the cheeztv instance reads under subPath kids, so an
|
||||||
|
# episode resolves identically across instances.
|
||||||
|
mountPath: /media/tv
|
||||||
|
subPath: adult
|
||||||
|
readOnly: true
|
||||||
|
- name: media-tv
|
||||||
|
# Also mount the kids TV subtree (subPath kids) so fafflix can
|
||||||
|
# resume playback of kids content started on cheeztv — same
|
||||||
|
# underlying subvolume, different subtree, distinct mount path.
|
||||||
|
mountPath: /media/tv-kids
|
||||||
|
subPath: kids
|
||||||
|
readOnly: true
|
||||||
|
- name: media-movies
|
||||||
|
# Adult instance: mount the movies/adult subtree of the shared
|
||||||
|
# movies subvolume (subPath adult) as fafflix's primary movie
|
||||||
|
# library.
|
||||||
|
mountPath: /media/movies
|
||||||
|
subPath: adult
|
||||||
|
readOnly: true
|
||||||
|
- name: media-movies
|
||||||
|
# Also mount the kids movies subtree (subPath kids) for cross-resume
|
||||||
|
# of kids content started on cheeztv.
|
||||||
|
mountPath: /media/movies-kids
|
||||||
|
subPath: kids
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fafflix-config
|
||||||
|
- name: transcode
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fafflix-transcode
|
||||||
|
- name: media-tv
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fafflix-media-tv
|
||||||
|
- name: media-movies
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fafflix-media-movies
|
||||||
|
volumeClaimTemplates:
|
||||||
|
# Per-pod scratch cache — RWO, disposable, one PVC per replica.
|
||||||
|
- metadata:
|
||||||
|
name: cache
|
||||||
|
annotations:
|
||||||
|
# Exclude the per-pod cache PVCs from the fafflix-config k8up Schedule
|
||||||
|
# (skipWithoutAnnotation is false cluster-wide). Cache is disposable and
|
||||||
|
# RWO — it would also fail to mount into the backup pod while in use.
|
||||||
|
k8up.io/backup: "false"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
storageClassName: cephrbd-fast-delete
|
||||||
|
volumeMode: Filesystem
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
# HA Valkey managed by valkey-operator as Jellyfin's distributed transcode-session
|
||||||
|
# store. shards:1 + replicas:2 is one primary with two replicas in a single shard
|
||||||
|
# group (three ValkeyNodes total): losing the primary triggers an automatic
|
||||||
|
# failover to a replica, so a node/pod loss no longer drops the shared transcode
|
||||||
|
# lease state the two Jellyfin replicas coordinate through. The operator always
|
||||||
|
# runs Valkey cluster-mode-enabled with protected-mode off and leaves the built-in
|
||||||
|
# `default` user passwordless, so clients connect with no auth/TLS (parity with the
|
||||||
|
# old open redis); StackExchange.Redis seeds off the single headless service and
|
||||||
|
# auto-discovers the topology plus failovers, so the connection string is
|
||||||
|
# unchanged. scheduling.node.spread.shard:Required renders pod anti-affinity that
|
||||||
|
# keeps the three nodes on distinct hosts (kubernetes.io/hostname), so one host
|
||||||
|
# loss removes at most one node. podDisruptionBudget.mode:Cluster lets the operator
|
||||||
|
# manage a quorum-aware PDB. Persistence stays omitted so /data is an emptyDir:
|
||||||
|
# lease state is ephemeral (30s TTLs), replication+failover already provide
|
||||||
|
# redundancy and a replaced node re-syncs from the primary, and an operator-managed
|
||||||
|
# PVC cannot carry the k8up.io/backup:"false" annotation the namespace's
|
||||||
|
# cluster-wide k8up Schedule needs to skip in-use RWO volumes.
|
||||||
|
apiVersion: valkey.io/v1alpha1
|
||||||
|
kind: ValkeyCluster
|
||||||
|
metadata:
|
||||||
|
name: fafflix-valkey
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
shards: 1
|
||||||
|
replicas: 2
|
||||||
|
image: docker.io/valkey/valkey:9.0.0
|
||||||
|
# redis_exporter sidecar (:9121, port name `metrics`) on every ValkeyNode pod;
|
||||||
|
# the operator manages a dedicated _exporter ACL user for it. Image version
|
||||||
|
# pinned; scraped by valkey-exporter VMPodScrape in vmpodscrape.yaml.
|
||||||
|
exporter:
|
||||||
|
enabled: true
|
||||||
|
image: docker.io/oliver006/redis_exporter:v1.89.0
|
||||||
|
scheduling:
|
||||||
|
node:
|
||||||
|
spread:
|
||||||
|
shard:
|
||||||
|
mode: Required
|
||||||
|
podDisruptionBudget:
|
||||||
|
mode: Cluster
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultAuth
|
||||||
|
metadata:
|
||||||
|
name: default
|
||||||
|
namespace: fafflix
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
|
spec:
|
||||||
|
allowedNamespaces:
|
||||||
|
- fafflix
|
||||||
|
kubernetes:
|
||||||
|
audiences:
|
||||||
|
- vault
|
||||||
|
role: default
|
||||||
|
serviceAccount: default
|
||||||
|
tokenExpirationSeconds: 600
|
||||||
|
method: kubernetes
|
||||||
|
mount: k8s/au/syd1
|
||||||
|
vaultConnectionRef: vso-system/default
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
# restic repository password for the k8up fafflix-config backups. Seeded at
|
||||||
|
# kv/kubernetes/namespace/fafflix/default/k8up-restic (key: password); the
|
||||||
|
# default k8s role's templated policy already grants read here, so no
|
||||||
|
# terraform-vault change is needed. VSO syncs it into the fafflix-k8up-restic
|
||||||
|
# Secret that the Schedule references via backend.repoPasswordSecretRef.
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: fafflix-k8up-restic
|
||||||
|
namespace: fafflix
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
create: true
|
||||||
|
name: fafflix-k8up-restic
|
||||||
|
overwrite: true
|
||||||
|
hmacSecretData: true
|
||||||
|
mount: kv
|
||||||
|
path: kubernetes/namespace/fafflix/default/k8up-restic
|
||||||
|
refreshAfter: 5m
|
||||||
|
type: kv-v2
|
||||||
|
vaultAuthRef: default
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
# Scrape the operator-injected redis_exporter sidecar (:9121, port name
|
||||||
|
# `metrics`) on the fafflix-valkey ValkeyNode pods. The valkey-operator gives
|
||||||
|
# its pods fixed labels only (no pod-label passthrough on the ValkeyCluster CR),
|
||||||
|
# so select on the operator-managed labels. Picked up by the observability
|
||||||
|
# VMAgent (selectAllByDefault).
|
||||||
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
|
kind: VMPodScrape
|
||||||
|
metadata:
|
||||||
|
name: valkey-exporter
|
||||||
|
namespace: fafflix
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/managed-by: valkey-operator
|
||||||
|
app.kubernetes.io/component: valkey-node
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: metrics
|
||||||
|
path: /metrics
|
||||||
+1
-1
@@ -3,4 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ../../../base/jellyfin
|
- ../../../base/cheeztv
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../../base/fafflix
|
||||||
@@ -10,7 +10,8 @@ spec:
|
|||||||
repoURL: https://git.unkin.net/unkin/argocd-apps
|
repoURL: https://git.unkin.net/unkin/argocd-apps
|
||||||
revision: HEAD
|
revision: HEAD
|
||||||
directories:
|
directories:
|
||||||
- path: apps/overlays/*/jellyfin
|
- path: apps/overlays/*/fafflix
|
||||||
|
- path: apps/overlays/*/cheeztv
|
||||||
- path: apps/overlays/*/arrstack
|
- path: apps/overlays/*/arrstack
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ spec:
|
|||||||
sourceRepos:
|
sourceRepos:
|
||||||
- https://git.unkin.net/unkin/argocd-apps
|
- https://git.unkin.net/unkin/argocd-apps
|
||||||
destinations:
|
destinations:
|
||||||
- namespace: 'jellyfin'
|
- namespace: 'fafflix'
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
- namespace: 'cheeztv'
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
- namespace: 'arrstack'
|
- namespace: 'arrstack'
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
|
|||||||
Reference in New Issue
Block a user