From 75770b6244e89673c777b7f860080674c9beda46 Mon Sep 17 00:00:00 2001 From: Steven Kreitzer Date: Wed, 4 Dec 2024 18:04:54 -0600 Subject: [PATCH] feat(media): deploy jellyseerr --- .../media/jellyseerr/app/externalsecret.yaml | 30 +++++++++++++++++++ .../app/helmrelease.yaml | 23 ++++++++++---- .../app/kustomization.yaml | 1 + .../{overseerr => jellyseerr}/app/pvc.yaml | 2 +- .../app/volsync.yaml | 20 ++++++------- .../media/{overseerr => jellyseerr}/ks.yaml | 5 ++-- kubernetes/apps/media/kustomization.yaml | 2 +- .../app/externalsecret.yaml | 4 +-- .../exporters/overseerr-exporter/ks.yaml | 2 +- 9 files changed, 66 insertions(+), 23 deletions(-) create mode 100644 kubernetes/apps/media/jellyseerr/app/externalsecret.yaml rename kubernetes/apps/media/{overseerr => jellyseerr}/app/helmrelease.yaml (79%) rename kubernetes/apps/media/{overseerr => jellyseerr}/app/kustomization.yaml (83%) rename kubernetes/apps/media/{overseerr => jellyseerr}/app/pvc.yaml (87%) rename kubernetes/apps/media/{overseerr => jellyseerr}/app/volsync.yaml (85%) rename kubernetes/apps/media/{overseerr => jellyseerr}/ks.yaml (80%) diff --git a/kubernetes/apps/media/jellyseerr/app/externalsecret.yaml b/kubernetes/apps/media/jellyseerr/app/externalsecret.yaml new file mode 100644 index 0000000000..0ac23b06f6 --- /dev/null +++ b/kubernetes/apps/media/jellyseerr/app/externalsecret.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: jellyseerr +spec: + secretStoreRef: + kind: ClusterSecretStore + name: onepassword-connect + target: + name: jellyseerr-secret + template: + engineVersion: v2 + data: + DB_TYPE: postgres + DB_HOST: &dbHost postgres-rw.databases.svc.cluster.local + DB_PORT: "5432" + DB_USER: &dbUser "{{ .JELLYSEERR_POSTGRES_USER }}" + DB_PASS: &dbPass "{{ .JELLYSEERR_POSTGRES_PASS }}" + DB_NAME: &dbName jellyseerr + INIT_POSTGRES_HOST: *dbHost + INIT_POSTGRES_USER: *dbUser + INIT_POSTGRES_PASS: *dbPass + INIT_POSTGRES_DBNAME: *dbName + INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}" + dataFrom: + - extract: + key: jellyseerr + - extract: + key: cloudnative-pg diff --git a/kubernetes/apps/media/overseerr/app/helmrelease.yaml b/kubernetes/apps/media/jellyseerr/app/helmrelease.yaml similarity index 79% rename from kubernetes/apps/media/overseerr/app/helmrelease.yaml rename to kubernetes/apps/media/jellyseerr/app/helmrelease.yaml index 4dbdab0812..db49eac726 100644 --- a/kubernetes/apps/media/overseerr/app/helmrelease.yaml +++ b/kubernetes/apps/media/jellyseerr/app/helmrelease.yaml @@ -2,7 +2,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: - name: &app overseerr + name: &app jellyseerr spec: interval: 30m chart: @@ -23,16 +23,27 @@ spec: retries: 3 values: controllers: - overseerr: + jellyseerr: + annotations: + reloader.stakater.com/auto: "true" + initContainers: + init-db: + image: + repository: ghcr.io/buroa/postgres-init + tag: 16 + envFrom: &envFrom + - secretRef: + name: jellyseerr-secret containers: app: image: - repository: ghcr.io/sct/overseerr - tag: develop@sha256:568f126f69663cf764d12bf19ba5a250be2246cca49852e556f363d0acac2603 + repository: docker.io/fallenbagel/jellyseerr + tag: preview-postgres@sha256:f189c58bf2692babc3f2dd7ce6bb4931a4942679eaedcc00a4ddbc4cd49bc002 env: LOG_LEVEL: info PORT: &port 5055 TZ: ${TIMEZONE} + envFrom: *envFrom probes: liveness: &probes enabled: true @@ -69,7 +80,7 @@ spec: className: external annotations: gatus.io/path: *path - hajimari.io/icon: mdi:eye-circle + hajimari.io/icon: cbi:jellyseerr hajimari.io/url: https://requests.ktwo.io hosts: - host: &host "{{ .Release.Name }}.ktwo.io" @@ -86,7 +97,7 @@ spec: - *customHost persistence: cache: - existingClaim: overseerr-cache + existingClaim: jellyseerr-cache globalMounts: - path: /app/config/cache config: diff --git a/kubernetes/apps/media/overseerr/app/kustomization.yaml b/kubernetes/apps/media/jellyseerr/app/kustomization.yaml similarity index 83% rename from kubernetes/apps/media/overseerr/app/kustomization.yaml rename to kubernetes/apps/media/jellyseerr/app/kustomization.yaml index 2920d15c8b..88c74b3f95 100644 --- a/kubernetes/apps/media/overseerr/app/kustomization.yaml +++ b/kubernetes/apps/media/jellyseerr/app/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - ./externalsecret.yaml - ./helmrelease.yaml - ./pvc.yaml - ./volsync.yaml diff --git a/kubernetes/apps/media/overseerr/app/pvc.yaml b/kubernetes/apps/media/jellyseerr/app/pvc.yaml similarity index 87% rename from kubernetes/apps/media/overseerr/app/pvc.yaml rename to kubernetes/apps/media/jellyseerr/app/pvc.yaml index 30adee028e..8067ac4aec 100644 --- a/kubernetes/apps/media/overseerr/app/pvc.yaml +++ b/kubernetes/apps/media/jellyseerr/app/pvc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: overseerr-cache + name: jellyseerr-cache spec: accessModes: ["ReadWriteOnce"] resources: diff --git a/kubernetes/apps/media/overseerr/app/volsync.yaml b/kubernetes/apps/media/jellyseerr/app/volsync.yaml similarity index 85% rename from kubernetes/apps/media/overseerr/app/volsync.yaml rename to kubernetes/apps/media/jellyseerr/app/volsync.yaml index 2629511cff..ea4898bc13 100644 --- a/kubernetes/apps/media/overseerr/app/volsync.yaml +++ b/kubernetes/apps/media/jellyseerr/app/volsync.yaml @@ -2,18 +2,18 @@ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: - name: overseerr-restic + name: jellyseerr-restic spec: secretStoreRef: kind: ClusterSecretStore name: onepassword-connect target: - name: overseerr-restic-secret + name: jellyseerr-restic-secret creationPolicy: Owner template: engineVersion: v2 data: - RESTIC_REPOSITORY: "{{ .REPOSITORY_TEMPLATE }}/overseerr" + RESTIC_REPOSITORY: "{{ .REPOSITORY_TEMPLATE }}/jellyseerr" RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}" AWS_ACCESS_KEY_ID: "{{ .AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "{{ .AWS_SECRET_ACCESS_KEY }}" @@ -24,13 +24,13 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: overseerr + name: jellyseerr spec: accessModes: ["ReadWriteOnce"] dataSourceRef: kind: ReplicationDestination apiGroup: volsync.backube - name: overseerr + name: jellyseerr resources: requests: storage: 2Gi @@ -39,12 +39,12 @@ spec: apiVersion: volsync.backube/v1alpha1 kind: ReplicationDestination metadata: - name: overseerr + name: jellyseerr spec: trigger: manual: restore-once restic: - repository: overseerr-restic-secret + repository: jellyseerr-restic-secret copyMethod: Snapshot accessModes: ["ReadWriteOnce"] storageClassName: ceph-block @@ -61,14 +61,14 @@ spec: apiVersion: volsync.backube/v1alpha1 kind: ReplicationSource metadata: - name: overseerr + name: jellyseerr spec: - sourcePVC: overseerr + sourcePVC: jellyseerr trigger: schedule: "15 */8 * * *" restic: pruneIntervalDays: 7 - repository: overseerr-restic-secret + repository: jellyseerr-restic-secret copyMethod: Snapshot accessModes: ["ReadWriteOnce"] storageClassName: ceph-block diff --git a/kubernetes/apps/media/overseerr/ks.yaml b/kubernetes/apps/media/jellyseerr/ks.yaml similarity index 80% rename from kubernetes/apps/media/overseerr/ks.yaml rename to kubernetes/apps/media/jellyseerr/ks.yaml index 7b9897eb6f..f7899ed621 100644 --- a/kubernetes/apps/media/overseerr/ks.yaml +++ b/kubernetes/apps/media/jellyseerr/ks.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: &app overseerr + name: &app jellyseerr namespace: flux-system spec: targetNamespace: media @@ -12,8 +12,9 @@ spec: dependsOn: - name: volsync - name: rook-ceph-cluster + - name: cloudnative-pg-cluster - name: external-secrets-stores - path: ./kubernetes/apps/media/overseerr/app + path: ./kubernetes/apps/media/jellyseerr/app prune: true sourceRef: kind: GitRepository diff --git a/kubernetes/apps/media/kustomization.yaml b/kubernetes/apps/media/kustomization.yaml index 0875dd8342..fd90dc683f 100644 --- a/kubernetes/apps/media/kustomization.yaml +++ b/kubernetes/apps/media/kustomization.yaml @@ -6,8 +6,8 @@ resources: - ./autobrr/ks.yaml - ./bazarr/ks.yaml - ./cross-seed/ks.yaml + - ./jellyseerr/ks.yaml - ./omegabrr/ks.yaml - - ./overseerr/ks.yaml - ./plex/ks.yaml - ./prowlarr/ks.yaml - ./qbittorrent/ks.yaml diff --git a/kubernetes/apps/monitoring/exporters/overseerr-exporter/app/externalsecret.yaml b/kubernetes/apps/monitoring/exporters/overseerr-exporter/app/externalsecret.yaml index fcfbdd8d29..cdd86e1903 100644 --- a/kubernetes/apps/monitoring/exporters/overseerr-exporter/app/externalsecret.yaml +++ b/kubernetes/apps/monitoring/exporters/overseerr-exporter/app/externalsecret.yaml @@ -13,7 +13,7 @@ spec: template: engineVersion: v2 data: - OVERSEERR_API_KEY: "{{ .OVERSEERR_API_KEY }}" + OVERSEERR_API_KEY: "{{ .JELLYSEERR_API_KEY }}" dataFrom: - extract: - key: overseerr + key: jellyseerr diff --git a/kubernetes/apps/monitoring/exporters/overseerr-exporter/ks.yaml b/kubernetes/apps/monitoring/exporters/overseerr-exporter/ks.yaml index f1e8b2e69f..aa0ab9b719 100644 --- a/kubernetes/apps/monitoring/exporters/overseerr-exporter/ks.yaml +++ b/kubernetes/apps/monitoring/exporters/overseerr-exporter/ks.yaml @@ -10,7 +10,7 @@ spec: labels: app.kubernetes.io/name: *app dependsOn: - - name: overseerr + - name: jellyseerr - name: external-secrets-stores path: ./kubernetes/apps/monitoring/exporters/overseerr-exporter/app prune: true