From 643548fbe00f722a1302adf2bd32b809c225e5d4 Mon Sep 17 00:00:00 2001 From: Thomas Way Date: Sat, 27 Jan 2024 16:46:31 +0000 Subject: [PATCH] chore(k8s/unwind): remove media --- k8s/unwind/list.cue | 2 - k8s/unwind/media/BUILD.bazel | 27 - k8s/unwind/media/README.md | 3 - k8s/unwind/media/bazarr/BUILD.bazel | 16 - k8s/unwind/media/bazarr/README.md | 3 - k8s/unwind/media/bazarr/list.cue | 31 - k8s/unwind/media/bazarr/service_list.cue | 26 - k8s/unwind/media/bazarr/stateful_set_list.cue | 92 --- k8s/unwind/media/jellyfin/BUILD.bazel | 16 - k8s/unwind/media/jellyfin/README.md | 3 - k8s/unwind/media/jellyfin/list.cue | 31 - k8s/unwind/media/jellyfin/service_list.cue | 38 -- .../media/jellyfin/stateful_set_list.cue | 121 ---- k8s/unwind/media/jellyseerr/BUILD.bazel | 16 - k8s/unwind/media/jellyseerr/README.md | 3 - k8s/unwind/media/jellyseerr/list.cue | 31 - k8s/unwind/media/jellyseerr/service_list.cue | 26 - .../media/jellyseerr/stateful_set_list.cue | 97 ---- k8s/unwind/media/lidarr/BUILD.bazel | 16 - k8s/unwind/media/lidarr/README.md | 5 - k8s/unwind/media/lidarr/list.cue | 31 - k8s/unwind/media/lidarr/service_list.cue | 26 - k8s/unwind/media/lidarr/stateful_set_list.cue | 92 --- k8s/unwind/media/list.cue | 47 -- k8s/unwind/media/namespace_list.cue | 14 - .../media/persistent_volume_claim_list.cue | 21 - k8s/unwind/media/prowlarr/BUILD.bazel | 21 - k8s/unwind/media/prowlarr/README.md | 15 - k8s/unwind/media/prowlarr/list.cue | 36 -- .../media/prowlarr/role_binding_list.cue | 26 - k8s/unwind/media/prowlarr/role_list.cue | 29 - .../prowlarr/secret_provider_class_list.cue | 40 -- .../media/prowlarr/service_account_list.cue | 14 - k8s/unwind/media/prowlarr/service_list.cue | 26 - .../media/prowlarr/stateful_set_list.cue | 129 ----- k8s/unwind/media/radarr/BUILD.bazel | 16 - k8s/unwind/media/radarr/README.md | 5 - k8s/unwind/media/radarr/list.cue | 31 - k8s/unwind/media/radarr/service_list.cue | 26 - k8s/unwind/media/radarr/stateful_set_list.cue | 92 --- k8s/unwind/media/readarr/BUILD.bazel | 16 - k8s/unwind/media/readarr/README.md | 5 - k8s/unwind/media/readarr/list.cue | 31 - k8s/unwind/media/readarr/service_list.cue | 26 - .../media/readarr/stateful_set_list.cue | 92 --- k8s/unwind/media/recyclarr/BUILD.bazel | 18 - k8s/unwind/media/recyclarr/README.md | 5 - .../media/recyclarr/config_map_list.cue | 546 ------------------ k8s/unwind/media/recyclarr/cron_job_list.cue | 138 ----- k8s/unwind/media/recyclarr/list.cue | 33 -- .../recyclarr/secret_provider_class_list.cue | 46 -- .../media/recyclarr/service_account_list.cue | 14 - k8s/unwind/media/sabnzbd/BUILD.bazel | 16 - k8s/unwind/media/sabnzbd/README.md | 7 - k8s/unwind/media/sabnzbd/list.cue | 31 - k8s/unwind/media/sabnzbd/service_list.cue | 26 - .../media/sabnzbd/stateful_set_list.cue | 92 --- k8s/unwind/media/sonarr/BUILD.bazel | 16 - k8s/unwind/media/sonarr/README.md | 5 - k8s/unwind/media/sonarr/list.cue | 31 - k8s/unwind/media/sonarr/service_list.cue | 26 - k8s/unwind/media/sonarr/stateful_set_list.cue | 92 --- k8s/unwind/media/tdarr/BUILD.bazel | 16 - k8s/unwind/media/tdarr/README.md | 0 k8s/unwind/media/tdarr/list.cue | 31 - k8s/unwind/media/tdarr/service_list.cue | 26 - k8s/unwind/media/tdarr/stateful_set_list.cue | 112 ---- k8s/unwind/media/transmission/BUILD.bazel | 16 - k8s/unwind/media/transmission/README.md | 7 - k8s/unwind/media/transmission/list.cue | 31 - .../media/transmission/service_list.cue | 26 - .../media/transmission/stateful_set_list.cue | 95 --- 72 files changed, 3012 deletions(-) delete mode 100644 k8s/unwind/media/BUILD.bazel delete mode 100644 k8s/unwind/media/README.md delete mode 100644 k8s/unwind/media/bazarr/BUILD.bazel delete mode 100644 k8s/unwind/media/bazarr/README.md delete mode 100644 k8s/unwind/media/bazarr/list.cue delete mode 100644 k8s/unwind/media/bazarr/service_list.cue delete mode 100644 k8s/unwind/media/bazarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/jellyfin/BUILD.bazel delete mode 100644 k8s/unwind/media/jellyfin/README.md delete mode 100644 k8s/unwind/media/jellyfin/list.cue delete mode 100644 k8s/unwind/media/jellyfin/service_list.cue delete mode 100644 k8s/unwind/media/jellyfin/stateful_set_list.cue delete mode 100644 k8s/unwind/media/jellyseerr/BUILD.bazel delete mode 100644 k8s/unwind/media/jellyseerr/README.md delete mode 100644 k8s/unwind/media/jellyseerr/list.cue delete mode 100644 k8s/unwind/media/jellyseerr/service_list.cue delete mode 100644 k8s/unwind/media/jellyseerr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/lidarr/BUILD.bazel delete mode 100644 k8s/unwind/media/lidarr/README.md delete mode 100644 k8s/unwind/media/lidarr/list.cue delete mode 100644 k8s/unwind/media/lidarr/service_list.cue delete mode 100644 k8s/unwind/media/lidarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/list.cue delete mode 100644 k8s/unwind/media/namespace_list.cue delete mode 100644 k8s/unwind/media/persistent_volume_claim_list.cue delete mode 100644 k8s/unwind/media/prowlarr/BUILD.bazel delete mode 100644 k8s/unwind/media/prowlarr/README.md delete mode 100644 k8s/unwind/media/prowlarr/list.cue delete mode 100644 k8s/unwind/media/prowlarr/role_binding_list.cue delete mode 100644 k8s/unwind/media/prowlarr/role_list.cue delete mode 100644 k8s/unwind/media/prowlarr/secret_provider_class_list.cue delete mode 100644 k8s/unwind/media/prowlarr/service_account_list.cue delete mode 100644 k8s/unwind/media/prowlarr/service_list.cue delete mode 100644 k8s/unwind/media/prowlarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/radarr/BUILD.bazel delete mode 100644 k8s/unwind/media/radarr/README.md delete mode 100644 k8s/unwind/media/radarr/list.cue delete mode 100644 k8s/unwind/media/radarr/service_list.cue delete mode 100644 k8s/unwind/media/radarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/readarr/BUILD.bazel delete mode 100644 k8s/unwind/media/readarr/README.md delete mode 100644 k8s/unwind/media/readarr/list.cue delete mode 100644 k8s/unwind/media/readarr/service_list.cue delete mode 100644 k8s/unwind/media/readarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/recyclarr/BUILD.bazel delete mode 100644 k8s/unwind/media/recyclarr/README.md delete mode 100644 k8s/unwind/media/recyclarr/config_map_list.cue delete mode 100644 k8s/unwind/media/recyclarr/cron_job_list.cue delete mode 100644 k8s/unwind/media/recyclarr/list.cue delete mode 100644 k8s/unwind/media/recyclarr/secret_provider_class_list.cue delete mode 100644 k8s/unwind/media/recyclarr/service_account_list.cue delete mode 100644 k8s/unwind/media/sabnzbd/BUILD.bazel delete mode 100644 k8s/unwind/media/sabnzbd/README.md delete mode 100644 k8s/unwind/media/sabnzbd/list.cue delete mode 100644 k8s/unwind/media/sabnzbd/service_list.cue delete mode 100644 k8s/unwind/media/sabnzbd/stateful_set_list.cue delete mode 100644 k8s/unwind/media/sonarr/BUILD.bazel delete mode 100644 k8s/unwind/media/sonarr/README.md delete mode 100644 k8s/unwind/media/sonarr/list.cue delete mode 100644 k8s/unwind/media/sonarr/service_list.cue delete mode 100644 k8s/unwind/media/sonarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/tdarr/BUILD.bazel delete mode 100644 k8s/unwind/media/tdarr/README.md delete mode 100644 k8s/unwind/media/tdarr/list.cue delete mode 100644 k8s/unwind/media/tdarr/service_list.cue delete mode 100644 k8s/unwind/media/tdarr/stateful_set_list.cue delete mode 100644 k8s/unwind/media/transmission/BUILD.bazel delete mode 100644 k8s/unwind/media/transmission/README.md delete mode 100644 k8s/unwind/media/transmission/list.cue delete mode 100644 k8s/unwind/media/transmission/service_list.cue delete mode 100644 k8s/unwind/media/transmission/stateful_set_list.cue diff --git a/k8s/unwind/list.cue b/k8s/unwind/list.cue index c147816a4..e37ef8fe4 100644 --- a/k8s/unwind/list.cue +++ b/k8s/unwind/list.cue @@ -18,7 +18,6 @@ import ( "github.com/uhthomas/automata/k8s/unwind/kube_system" "github.com/uhthomas/automata/k8s/unwind/kubernetes_dashboard" "github.com/uhthomas/automata/k8s/unwind/loki" - "github.com/uhthomas/automata/k8s/unwind/media" "github.com/uhthomas/automata/k8s/unwind/minecraft" "github.com/uhthomas/automata/k8s/unwind/node_exporter" "github.com/uhthomas/automata/k8s/unwind/node_feature_discovery" @@ -74,7 +73,6 @@ _items: [ kube_system.#List.items, kubernetes_dashboard.#List.items, loki.#List.items, - media.#List.items, minecraft.#List.items, node_exporter.#List.items, node_feature_discovery.#List.items, diff --git a/k8s/unwind/media/BUILD.bazel b/k8s/unwind/media/BUILD.bazel deleted file mode 100644 index 8286a0915..000000000 --- a/k8s/unwind/media/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_media_library", - srcs = [ - "list.cue", - "namespace_list.cue", - "persistent_volume_claim_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - "//k8s/unwind/media/bazarr:cue_bazarr_library", - "//k8s/unwind/media/jellyfin:cue_jellyfin_library", - "//k8s/unwind/media/jellyseerr:cue_jellyseerr_library", - "//k8s/unwind/media/lidarr:cue_lidarr_library", - "//k8s/unwind/media/prowlarr:cue_prowlarr_library", - "//k8s/unwind/media/radarr:cue_radarr_library", - "//k8s/unwind/media/readarr:cue_readarr_library", - "//k8s/unwind/media/recyclarr:cue_recyclarr_library", - "//k8s/unwind/media/sabnzbd:cue_sabnzbd_library", - "//k8s/unwind/media/sonarr:cue_sonarr_library", - "//k8s/unwind/media/tdarr:cue_tdarr_library", - "//k8s/unwind/media/transmission:cue_transmission_library", - ], -) diff --git a/k8s/unwind/media/README.md b/k8s/unwind/media/README.md deleted file mode 100644 index 46754a067..000000000 --- a/k8s/unwind/media/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Media - -A collection of media services. diff --git a/k8s/unwind/media/bazarr/BUILD.bazel b/k8s/unwind/media/bazarr/BUILD.bazel deleted file mode 100644 index da3c0d925..000000000 --- a/k8s/unwind/media/bazarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_bazarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/bazarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/bazarr/README.md b/k8s/unwind/media/bazarr/README.md deleted file mode 100644 index 0010696e7..000000000 --- a/k8s/unwind/media/bazarr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Bazarr - -https://www.bazarr.media/ diff --git a/k8s/unwind/media/bazarr/list.cue b/k8s/unwind/media/bazarr/list.cue deleted file mode 100644 index 614cb2c74..000000000 --- a/k8s/unwind/media/bazarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package bazarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "bazarr" -#Version: "1.2.0" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/bazarr/service_list.cue b/k8s/unwind/media/bazarr/service_list.cue deleted file mode 100644 index cedb7bb78..000000000 --- a/k8s/unwind/media/bazarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package bazarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/bazarr/stateful_set_list.cue b/k8s/unwind/media/bazarr/stateful_set_list.cue deleted file mode 100644 index 83fcf7833..000000000 --- a/k8s/unwind/media/bazarr/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package bazarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/bazarr:\(#Version)@sha256:6c294db4344419150c73adfb2d6d7933573f2e6f258127787006fa971dd85161" - ports: [{ - name: "http" - containerPort: 6767 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/jellyfin/BUILD.bazel b/k8s/unwind/media/jellyfin/BUILD.bazel deleted file mode 100644 index 7e0c04525..000000000 --- a/k8s/unwind/media/jellyfin/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_jellyfin_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/jellyfin", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/jellyfin/README.md b/k8s/unwind/media/jellyfin/README.md deleted file mode 100644 index 19dff3069..000000000 --- a/k8s/unwind/media/jellyfin/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Jellyfin - -https://jellyfin.org/ diff --git a/k8s/unwind/media/jellyfin/list.cue b/k8s/unwind/media/jellyfin/list.cue deleted file mode 100644 index 2399141e7..000000000 --- a/k8s/unwind/media/jellyfin/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package jellyfin - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "jellyfin" -#Version: "20230401.5-unstable" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/jellyfin/service_list.cue b/k8s/unwind/media/jellyfin/service_list.cue deleted file mode 100644 index 1612e233c..000000000 --- a/k8s/unwind/media/jellyfin/service_list.cue +++ /dev/null @@ -1,38 +0,0 @@ -package jellyfin - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }, { - name: "https" - port: 443 - targetPort: "https" - }, { - name: "upnp" - port: 1900 - targetPort: "upnp" - }, { - name: "discovery" - port: 7359 - targetPort: "discovery" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/jellyfin/stateful_set_list.cue b/k8s/unwind/media/jellyfin/stateful_set_list.cue deleted file mode 100644 index 25a6c8cbf..000000000 --- a/k8s/unwind/media/jellyfin/stateful_set_list.cue +++ /dev/null @@ -1,121 +0,0 @@ -package jellyfin - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - let configDirectory = "/etc/\(#Name)/config" - - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "jellyfin/jellyfin:\(#Version)@sha256:28824fd860d288905e0c7b2d591d52c606bfa96e65f2baefb7465ac84bd582f9" - ports: [{ - name: "http" - containerPort: 8096 - }, { - name: "https" - containerPort: 8920 - }, { - name: "upnp" - containerPort: 1900 - protocol: v1.#ProtocolUDP - }, { - name: "discovery" - containerPort: 7359 - protocol: v1.#ProtocolUDP - }] - env: [{ - // .NET CoreCLR crashes when run - // in a container with a - // read-only filesystem. - // - // https://github.com/Radarr/Radarr/issues/7030#issuecomment-1039689518 - // https://github.com/dotnet/runtime/issues/9336 - name: "COMPlus_EnableDiagnostics" - value: "0" - }, { - name: "JELLYFIN_CONFIG_DIR" - value: configDirectory - }, { - name: "JELLYFIN_DATA_DIR" - value: "/data" - }] - resources: { - limits: { - (v1.#ResourceCPU): "4" - memory: "16Gi" - "gpu.intel.com/i915": 1 - } - requests: { - (v1.#ResourceCPU): "2" - (v1.#ResourceMemory): "4Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: configDirectory - }, { - name: "data" - mountPath: "/data" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - securityContext: { - runAsUser: 1000 - runAsGroup: 3000 - runAsNonRoot: true - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "5Gi" - } - }, { - metadata: name: "data" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "64Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/jellyseerr/BUILD.bazel b/k8s/unwind/media/jellyseerr/BUILD.bazel deleted file mode 100644 index 52ae453d6..000000000 --- a/k8s/unwind/media/jellyseerr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_jellyseerr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/jellyseerr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/jellyseerr/README.md b/k8s/unwind/media/jellyseerr/README.md deleted file mode 100644 index f6d9adbcb..000000000 --- a/k8s/unwind/media/jellyseerr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Jellyseerr - -https://github.com/Fallenbagel/jellyseerr diff --git a/k8s/unwind/media/jellyseerr/list.cue b/k8s/unwind/media/jellyseerr/list.cue deleted file mode 100644 index 5f097adc6..000000000 --- a/k8s/unwind/media/jellyseerr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package jellyseerr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "jellyseerr" -#Version: "1.5.0" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/jellyseerr/service_list.cue b/k8s/unwind/media/jellyseerr/service_list.cue deleted file mode 100644 index 1981d0483..000000000 --- a/k8s/unwind/media/jellyseerr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package jellyseerr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/jellyseerr/stateful_set_list.cue b/k8s/unwind/media/jellyseerr/stateful_set_list.cue deleted file mode 100644 index a39fbaed0..000000000 --- a/k8s/unwind/media/jellyseerr/stateful_set_list.cue +++ /dev/null @@ -1,97 +0,0 @@ -package jellyseerr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "tmp" - emptyDir: {} - }, { - name: "yarn-cache" - emptyDir: {} - }, { - name: "yarn" - emptyDir: {} - }] - containers: [{ - name: #Name - image: "fallenbagel/jellyseerr:\(#Version)@sha256:eacfbd18c13036b5fea87fc8c44ea165c6339d75fe15d3f0c83bbf3e39a1560e" - ports: [{ - name: "http" - containerPort: 5055 - }] - env: [{ - name: "TZ" - value: "Europe/London" - }] - resources: { - limits: { - (v1.#ResourceCPU): "2" - (v1.#ResourceMemory): "8Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/app/config" - }, { - name: "tmp" - mountPath: "/tmp" - }, { - name: "yarn-cache" - mountPath: "/home/node/.cache/yarn" - }, { - name: "yarn" - mountPath: "/home/node/.yarn" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - securityContext: { - runAsUser: 1000 - runAsGroup: 3000 - runAsNonRoot: true - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "2Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/lidarr/BUILD.bazel b/k8s/unwind/media/lidarr/BUILD.bazel deleted file mode 100644 index dcd668343..000000000 --- a/k8s/unwind/media/lidarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_lidarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/lidarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/lidarr/README.md b/k8s/unwind/media/lidarr/README.md deleted file mode 100644 index 2e7ca4515..000000000 --- a/k8s/unwind/media/lidarr/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Lidarr - -https://lidarr.audio/ - -The service must have the root folder `/media/music` added to work correctly. diff --git a/k8s/unwind/media/lidarr/list.cue b/k8s/unwind/media/lidarr/list.cue deleted file mode 100644 index a7fb44c92..000000000 --- a/k8s/unwind/media/lidarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package lidarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "lidarr" -#Version: "1.0.2.2592-ls114" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/lidarr/service_list.cue b/k8s/unwind/media/lidarr/service_list.cue deleted file mode 100644 index d24b0a9ef..000000000 --- a/k8s/unwind/media/lidarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package lidarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/lidarr/stateful_set_list.cue b/k8s/unwind/media/lidarr/stateful_set_list.cue deleted file mode 100644 index 55f8f6a23..000000000 --- a/k8s/unwind/media/lidarr/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package lidarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/lidarr:\(#Version)@sha256:6fcb17a60fb4c6de7948098c5a769e2be655864187ee37c11f711ee10318562f" - ports: [{ - name: "http" - containerPort: 8686 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/list.cue b/k8s/unwind/media/list.cue deleted file mode 100644 index d2f61a7e2..000000000 --- a/k8s/unwind/media/list.cue +++ /dev/null @@ -1,47 +0,0 @@ -package media - -import ( - "list" - - "github.com/uhthomas/automata/k8s/unwind/media/bazarr" - "github.com/uhthomas/automata/k8s/unwind/media/jellyfin" - "github.com/uhthomas/automata/k8s/unwind/media/jellyseerr" - "github.com/uhthomas/automata/k8s/unwind/media/lidarr" - "github.com/uhthomas/automata/k8s/unwind/media/prowlarr" - "github.com/uhthomas/automata/k8s/unwind/media/radarr" - "github.com/uhthomas/automata/k8s/unwind/media/readarr" - "github.com/uhthomas/automata/k8s/unwind/media/recyclarr" - "github.com/uhthomas/automata/k8s/unwind/media/sabnzbd" - "github.com/uhthomas/automata/k8s/unwind/media/sonarr" - "github.com/uhthomas/automata/k8s/unwind/media/tdarr" - "github.com/uhthomas/automata/k8s/unwind/media/transmission" - "k8s.io/api/core/v1" -) - -#Name: "media" -#Namespace: #Name - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{metadata: namespace: #Namespace}] -} - -#List: items: list.Concat(_items) - -_items: [ - #NamespaceList.items, - #PersistentVolumeClaimList.items, - bazarr.#List.items, - jellyfin.#List.items, - jellyseerr.#List.items, - lidarr.#List.items, - prowlarr.#List.items, - radarr.#List.items, - readarr.#List.items, - recyclarr.#List.items, - sabnzbd.#List.items, - sonarr.#List.items, - tdarr.#List.items, - transmission.#List.items, -] diff --git a/k8s/unwind/media/namespace_list.cue b/k8s/unwind/media/namespace_list.cue deleted file mode 100644 index 3fb4185c9..000000000 --- a/k8s/unwind/media/namespace_list.cue +++ /dev/null @@ -1,14 +0,0 @@ -package media - -import "k8s.io/api/core/v1" - -#NamespaceList: v1.#NamespaceList & { - apiVersion: "v1" - kind: "NamespaceList" - items: [...{ - apiVersion: "v1" - kind: "Namespace" - }] -} - -#NamespaceList: items: [{metadata: name: #Name}] diff --git a/k8s/unwind/media/persistent_volume_claim_list.cue b/k8s/unwind/media/persistent_volume_claim_list.cue deleted file mode 100644 index 30d144086..000000000 --- a/k8s/unwind/media/persistent_volume_claim_list.cue +++ /dev/null @@ -1,21 +0,0 @@ -package media - -import "k8s.io/api/core/v1" - -#PersistentVolumeClaimList: v1.#PersistentVolumeClaimList & { - apiVersion: "v1" - kind: "PersistentVolumeClaimList" - items: [...{ - apiVersion: "v1" - kind: "PersistentVolumeClaim" - }] -} - -#PersistentVolumeClaimList: items: [{ - metadata: name: #Name - spec: { - accessModes: [v1.#ReadWriteMany] - storageClassName: "rook-cephfs-hdd-ec-retain" - resources: requests: (v1.#ResourceStorage): "10Ti" - } -}] diff --git a/k8s/unwind/media/prowlarr/BUILD.bazel b/k8s/unwind/media/prowlarr/BUILD.bazel deleted file mode 100644 index df0ee00f6..000000000 --- a/k8s/unwind/media/prowlarr/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_prowlarr_library", - srcs = [ - "list.cue", - "role_binding_list.cue", - "role_list.cue", - "secret_provider_class_list.cue", - "service_account_list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/prowlarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/rbac/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/prowlarr/README.md b/k8s/unwind/media/prowlarr/README.md deleted file mode 100644 index 85c556ed5..000000000 --- a/k8s/unwind/media/prowlarr/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Prowlarr - -https://github.com/Prowlarr/Prowlarr - -## Tailscale - -[Tailscale](https://tailscale.com/) is run as an exit node with a socks5 server -for Prowlarr to use instead of the local network. - -The auth key is stored in Vault. - -```sh -❯ k -n vault exec vault-0 -- vault kv put secret/kubernetes/unwind/media/prowlarr-tailscale-authkey authkey= -❯ k -n vault exec -it vault-0 -- vault write auth/kubernetes/role/media-prowlarr-tailscale-read bound_service_account_names=prowlarr bound_service_account_namespaces=media policies=kubernetes-kv-read ttl=24h -``` diff --git a/k8s/unwind/media/prowlarr/list.cue b/k8s/unwind/media/prowlarr/list.cue deleted file mode 100644 index d53658576..000000000 --- a/k8s/unwind/media/prowlarr/list.cue +++ /dev/null @@ -1,36 +0,0 @@ -package prowlarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "prowlarr" -#Namespace: "media" -#Version: "1.2.2" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #RoleBindingList.items, - #RoleList.items, - #SecretProviderClassList.items, - #ServiceAccountList.items, - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/prowlarr/role_binding_list.cue b/k8s/unwind/media/prowlarr/role_binding_list.cue deleted file mode 100644 index 7ccd9f70f..000000000 --- a/k8s/unwind/media/prowlarr/role_binding_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package prowlarr - -import rbacv1 "k8s.io/api/rbac/v1" - -#RoleBindingList: rbacv1.#RoleBindingList & { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "RoleBindingList" - items: [...{ - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "RoleBinding" - }] -} - -#RoleBindingList: items: [{ - metadata: name: "\(#Name)-tailscale-state" - subjects: [{ - kind: rbacv1.#ServiceAccountKind - name: #Name - namespace: #Namespace - }] - roleRef: { - kind: "Role" - name: metadata.name - apiGroup: rbacv1.#GroupName - } -}] diff --git a/k8s/unwind/media/prowlarr/role_list.cue b/k8s/unwind/media/prowlarr/role_list.cue deleted file mode 100644 index 6abbadca1..000000000 --- a/k8s/unwind/media/prowlarr/role_list.cue +++ /dev/null @@ -1,29 +0,0 @@ -package prowlarr - -import ( - rbacv1 "k8s.io/api/rbac/v1" - "k8s.io/api/core/v1" -) - -#RoleList: rbacv1.#RoleList & { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "RoleList" - items: [...{ - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "Role" - }] -} - -#RoleList: items: [{ - metadata: name: "\(#Name)-tailscale-state" - rules: [{ - apiGroups: [v1.#GroupName] - resources: [v1.#ResourceSecrets] - verbs: ["create"] - }, { - apiGroups: [v1.#GroupName] - resourceNames: [metadata.name] - resources: [v1.#ResourceSecrets] - verbs: ["get", "update", "patch"] - }] -}] diff --git a/k8s/unwind/media/prowlarr/secret_provider_class_list.cue b/k8s/unwind/media/prowlarr/secret_provider_class_list.cue deleted file mode 100644 index 263636518..000000000 --- a/k8s/unwind/media/prowlarr/secret_provider_class_list.cue +++ /dev/null @@ -1,40 +0,0 @@ -package prowlarr - -import ( - "encoding/yaml" - - "k8s.io/api/core/v1" -) - -#SecretProviderClassList: v1.#List & { - apiVersion: "secrets-store.csi.x-k8s.io/v1" - kind: "SecretProviderClassList" - items: [...{ - apiVersion: "secrets-store.csi.x-k8s.io/v1" - kind: "SecretProviderClass" - }] -} - -#SecretProviderClassList: items: [{ - metadata: name: "\(#Name)-tailscale" - spec: { - provider: "vault" - secretObjects: [{ - secretName: metadata.name - type: v1.#SecretTypeOpaque - data: [{ - key: "authkey" - objectName: "authkey" - }] - }] - parameters: { - roleName: "media-prowlarr-tailscale-read" - vaultAddress: "http://vault.vault:8200" - objects: yaml.Marshal([{ - secretPath: "secret/data/kubernetes/unwind/media/prowlarr-tailscale-authkey" - objectName: "authkey" - secretKey: "authkey" - }]) - } - } -}] diff --git a/k8s/unwind/media/prowlarr/service_account_list.cue b/k8s/unwind/media/prowlarr/service_account_list.cue deleted file mode 100644 index 88b06978d..000000000 --- a/k8s/unwind/media/prowlarr/service_account_list.cue +++ /dev/null @@ -1,14 +0,0 @@ -package prowlarr - -import "k8s.io/api/core/v1" - -#ServiceAccountList: v1.#ServiceAccountList & { - apiVersion: "v1" - kind: "ServiceAccountList" - items: [...{ - apiVersion: "v1" - kind: "ServiceAccount" - }] -} - -#ServiceAccountList: items: [{}] diff --git a/k8s/unwind/media/prowlarr/service_list.cue b/k8s/unwind/media/prowlarr/service_list.cue deleted file mode 100644 index ff08c46a8..000000000 --- a/k8s/unwind/media/prowlarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package prowlarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/prowlarr/stateful_set_list.cue b/k8s/unwind/media/prowlarr/stateful_set_list.cue deleted file mode 100644 index 82165bc6c..000000000 --- a/k8s/unwind/media/prowlarr/stateful_set_list.cue +++ /dev/null @@ -1,129 +0,0 @@ -package prowlarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "tmp" - emptyDir: {} - }, { - name: "secrets-store-inline" - csi: { - driver: "secrets-store.csi.k8s.io" - readOnly: true - volumeAttributes: secretProviderClass: "\(#Name)-tailscale" - } - }] - containers: [{ - name: #Name - image: "linuxserver/prowlarr:\(#Version)@sha256:05fa9628c7c86c50faf208d519b5d4721609e000f7cbf6f5b7e34491e4bcdca8" - ports: [{ - name: "http" - containerPort: 9696 - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }, { - name: "tailscale" - image: "tailscale/tailscale:v1.38.2@sha256:176f2bca0906d605f411f189bd6a9747a1cf8418ca5fa55908879497774cb73b" - env: [{ - name: "TS_KUBE_SECRET" - value: "\(#Name)-tailscale-state" - }, { - name: "TS_USERSPACE" - value: "true" - }, { - name: "TS_AUTHKEY" - valueFrom: secretKeyRef: { - name: "\(#Name)-tailscale" - key: "authkey" - } - }, { - name: "TS_TAILSCALED_EXTRA_ARGS" - value: "--socks5-server=localhost:1055" - }, { - name: "TS_EXTRA_ARGS" - value: "--exit-node=100.87.32.47" - }] - volumeMounts: [{ - name: "tmp" - mountPath: "/tmp" - }, { - name: "secrets-store-inline" - readOnly: true - mountPath: "/mnt/secrets-store" - }] - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - runAsUser: 1000 - runAsGroup: 3000 - runAsNonRoot: true - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - serviceAccountName: #Name - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/radarr/BUILD.bazel b/k8s/unwind/media/radarr/BUILD.bazel deleted file mode 100644 index 509198266..000000000 --- a/k8s/unwind/media/radarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_radarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/radarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/radarr/README.md b/k8s/unwind/media/radarr/README.md deleted file mode 100644 index 378727d1a..000000000 --- a/k8s/unwind/media/radarr/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Radarr - -https://radarr.video/ - -The service must have the root folder `/media/movies` added to work correctly. diff --git a/k8s/unwind/media/radarr/list.cue b/k8s/unwind/media/radarr/list.cue deleted file mode 100644 index 998dc72bb..000000000 --- a/k8s/unwind/media/radarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package radarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "radarr" -#Version: "4.3.2" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/radarr/service_list.cue b/k8s/unwind/media/radarr/service_list.cue deleted file mode 100644 index cca22f68f..000000000 --- a/k8s/unwind/media/radarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package radarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/radarr/stateful_set_list.cue b/k8s/unwind/media/radarr/stateful_set_list.cue deleted file mode 100644 index ac9331932..000000000 --- a/k8s/unwind/media/radarr/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package radarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/radarr:\(#Version)@sha256:d767785c8c7028e398d38520d0f547ffef60b18d5ebb0e5fa85f92564bd47dd3" - ports: [{ - name: "http" - containerPort: 7878 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/readarr/BUILD.bazel b/k8s/unwind/media/readarr/BUILD.bazel deleted file mode 100644 index 346e00fad..000000000 --- a/k8s/unwind/media/readarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_readarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/readarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/readarr/README.md b/k8s/unwind/media/readarr/README.md deleted file mode 100644 index 314eea6c9..000000000 --- a/k8s/unwind/media/readarr/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Readarr - -https://readarr.com/ - -The service must have the root folder `/media/books` added to work correctly. diff --git a/k8s/unwind/media/readarr/list.cue b/k8s/unwind/media/readarr/list.cue deleted file mode 100644 index f89fa767b..000000000 --- a/k8s/unwind/media/readarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package readarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "readarr" -#Version: "0.1.4-nightly" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/readarr/service_list.cue b/k8s/unwind/media/readarr/service_list.cue deleted file mode 100644 index 9ccdf7cf9..000000000 --- a/k8s/unwind/media/readarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package readarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/readarr/stateful_set_list.cue b/k8s/unwind/media/readarr/stateful_set_list.cue deleted file mode 100644 index 70a27886d..000000000 --- a/k8s/unwind/media/readarr/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package readarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/readarr:\(#Version)@sha256:71cfec4831f74eed3d55a55d2ec82a31ce6d0c08b927d33688f8bbc6ad69fcaa" - ports: [{ - name: "http" - containerPort: 8787 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/recyclarr/BUILD.bazel b/k8s/unwind/media/recyclarr/BUILD.bazel deleted file mode 100644 index 96726b6bc..000000000 --- a/k8s/unwind/media/recyclarr/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_recyclarr_library", - srcs = [ - "config_map_list.cue", - "cron_job_list.cue", - "list.cue", - "secret_provider_class_list.cue", - "service_account_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/recyclarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/batch/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/recyclarr/README.md b/k8s/unwind/media/recyclarr/README.md deleted file mode 100644 index 983abf830..000000000 --- a/k8s/unwind/media/recyclarr/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Recyclarr - -https://recyclarr.dev/wiki/ - -https://github.com/recyclarr/recyclarr diff --git a/k8s/unwind/media/recyclarr/config_map_list.cue b/k8s/unwind/media/recyclarr/config_map_list.cue deleted file mode 100644 index 4ec919299..000000000 --- a/k8s/unwind/media/recyclarr/config_map_list.cue +++ /dev/null @@ -1,546 +0,0 @@ -package recyclarr - -import ( - "encoding/yaml" - "strings" - - "k8s.io/api/core/v1" -) - -#ConfigMapList: v1.#ConfigMapList & { - apiVersion: "v1" - kind: "ConfigMapList" - items: [...{ - apiVersion: "v1" - kind: "ConfigMap" - }] -} - -_#RecylarrConfig: { - #TrashID: string & { - strings.MinRunes(32) - =~"^[0-9a-fA-F]+$" - } - - #CustomFormats: { - trash_ids: [...#TrashID] - quality_profiles?: [...{ - name: string - score?: int - }] - } - - #QualityProfiles: { - name: string - reset_unmatched_scores?: bool - } - - #QualityDefinition: { - type: string - preferred_ratio?: number & >=0 & <=1 - } - - #Instance: { - base_url: string - api_key?: string - quality_definition?: #QualityDefinition - quality_profiles?: [...#QualityProfiles] - delete_old_custom_formats?: bool - replace_existing_custom_formats?: bool - custom_formats?: [...#CustomFormats] - } - - sonarr: [string]: #Instance - radarr: [string]: #Instance -} - -#ConfigMapList: items: [{ - data: "config.yaml": yaml.Marshal(_#RecylarrConfig & { - radarr: main: { - base_url: "http://radarr" - // An "env_var!" tag is added by an init container. - // - // https://recyclarr.dev/wiki/yaml/env-vars - api_key: "RADARR_API_KEY" - quality_definition: type: "movie" - quality_profiles: [{ - name: "Remux + WEB 2160p" - reset_unmatched_scores: true - }, { - name: "Remux + WEB 1080p" - reset_unmatched_scores: true - }, { - name: "Remux-1080p - Anime" - reset_unmatched_scores: true - }] - custom_formats: [{ - trash_ids: [ - // Audio - Uncomment the next section if you are using the Advanced Audio Formats - "496f355514737f7d83bf7aa4d24f8169", // TrueHD Atmos - "2f22d89048b01681dde8afe203bf2e95", // DTS X - "417804f7f2c4308c1f4c5d380d4c4475", // ATMOS (undefined) - "1af239278386be2919e1bcee0bde047e", // DD+ ATMOS - "3cafb66171b47f226146a0770576870f", // TrueHD - "dcf3ec6938fa32445f590a4da84256cd", // DTS-HD MA - "a570d4a0e56a2874b64e5bfa55202a1b", // FLAC - "e7c2fcae07cbada050a0af3357491d7b", // PCM - "8e109e50e0a0b83a5098b056e13bf6db", // DTS-HD HRA - "185f1dd7264c4562b9022d963ac37424", // DD+ - "f9f847ac70a0af62ea4a08280b859636", // DTS-ES - "1c1a4c5e823891c75bc50380a6866f73", // DTS - "240770601cc226190c367ef59aba7463", // AAC - "c2998bd0d90ed5621d8df281e839436e", // DD - // All HDR Formats - "e23edd2482476e595fb990b12e7c609c", // DV HDR10 - "58d6a88f13e2db7f5059c41047876f00", // DV - "55d53828b9d81cbe20b02efd00aa0efd", // DV HLG - "a3e19f8f627608af0211acd02bf89735", // DV SDR - "b974a6cd08c1066250f1f177d7aa1225", // HDR10+ - "dfb86d5941bc9075d6af23b09c2aeecd", // HDR10 - "e61e28db95d22bedcadf030b8f156d96", // HDR - "2a4d9069cc1fe3242ff9bdaebed239bb", // HDR (undefined) - "08d6d8834ad9ec87b1dc7ec8148e7a1f", // PQ - "9364dd386c9b4a1100dde8264690add7", // HLG - // DV (WEBDL) - The next line is uncommented by default, and ensures that releases with Dolby Vision will only be grabbed if they have HDR10 fallback. You can comment the line out if you do not need HDR10 fallback - "923b6abef9b17f937fab56cfcf89e1f1", // DV (WEBDL) - // HDR10Plus Boost - Uncomment the next line if any of your devices DO support HDR10+ - "b17886cb4158d9fea189859409975758", // HDR10Plus Boost - // Movie Versions - "0f12c086e289cf966fa5948eac571f44", // Hybrid - "570bc9ebecd92723d2d21500f4be314c", // Remaster - "eca37840c13c6ef2dd0262b141a5482f", // 4K Remaster - "e0c07d59beb37348e975a930d5e50319", // Criterion Collection - "9d27d9d2181838f76dee150882bdc58c", // Masters of Cinema - "db9b4c4b53d312a3ca5f1378f6440fc9", // Vinegar Syndrome - "957d0f44b592285f26449575e8b1167e", // Special Edition - "eecf3a857724171f968a66cb5719e152", // IMAX - "9f6cbff8cfe4ebbc1bde14c7b7bec0de", // IMAX Enhanced - // HQ Release Groups - "3a3ff47579026e76d6504ebea39390de", // Remux Tier 01 - "9f98181fe5a3fbeb0cc29340da2a468a", // Remux Tier 02 - "c20f169ef63c5f40c2def54abaf4438e", // WEB Tier 01 - "403816d65392c79236dcb6dd591aeda4", // WEB Tier 02 - "af94e0fe497124d1f9ce732069ec8c3b", // WEB Tier 03 - // Misc - "e7718d7a3ce595f289bfee26adc178f5", // Repack/Proper - "ae43b294509409a6a13919dedd4764c4", // Repack2 - // Unwanted - "ed38b889b31be83fda192888e2286d83", // BR-DISK - "90a6f9a284dff5103f6346090e6280c8", // LQ - "b8cd450cbfa689c0259a01d9e29ba3d6", // 3D - "9c38ebb7384dada637be8899efa68e6f", // SDR - // Streaming Services - "cc5e51a9e85a6296ceefe097a77f12f4", // BCORE - "2a6039655313bf5dab1e43523b62c374", // MA - ] - quality_profiles: [{ - name: "Remux + WEB 2160p" - }] - }, { - trash_ids: [ - "b3b3a6ac74ecbd56bcdbefa4799fb9df", // AMZN - "40e9380490e748672c2522eaaeb692f7", // ATVP - "84272245b2988854bfb76a16e60baea5", // DSNP - "509e5f41146e278f9eab1ddaceb34515", // HBO - "5763d1b0ce84aff3b21038eea8e9b8ad", // HMAX - "526d445d4c16214309f0fd2b3be18a89", // Hulu - "170b1d363bd8516fbf3a3eb05d4faff6", // NF - "c9fd353f8f5f1baf56dc601c4cb29920", // PCOK - "e36a0ba1bc902b26ee40818a1d59b8bd", // PMTP - "c2863d2a50c9acad1fb50e53ece60817", // STAN - ] - quality_profiles: [{ - name: "Remux + WEB 2160p" - score: 0 - }] - }, { - trash_ids: [ - // Audio - Uncomment the next section if you are using the Advanced Audio Formats - "496f355514737f7d83bf7aa4d24f8169", // TrueHD Atmos - "2f22d89048b01681dde8afe203bf2e95", // DTS X - "417804f7f2c4308c1f4c5d380d4c4475", // ATMOS (undefined) - "1af239278386be2919e1bcee0bde047e", // DD+ ATMOS - "3cafb66171b47f226146a0770576870f", // TrueHD - "dcf3ec6938fa32445f590a4da84256cd", // DTS-HD MA - "a570d4a0e56a2874b64e5bfa55202a1b", // FLAC - "e7c2fcae07cbada050a0af3357491d7b", // PCM - "8e109e50e0a0b83a5098b056e13bf6db", // DTS-HD HRA - "185f1dd7264c4562b9022d963ac37424", // DD+ - "f9f847ac70a0af62ea4a08280b859636", // DTS-ES - "1c1a4c5e823891c75bc50380a6866f73", // DTS - "240770601cc226190c367ef59aba7463", // AAC - "c2998bd0d90ed5621d8df281e839436e", // DD - // Movie Versions - "0f12c086e289cf966fa5948eac571f44", // Hybrid - "570bc9ebecd92723d2d21500f4be314c", // Remaster - "eca37840c13c6ef2dd0262b141a5482f", // 4K Remaster - "e0c07d59beb37348e975a930d5e50319", // Criterion Collection - "9d27d9d2181838f76dee150882bdc58c", // Masters of Cinema - "db9b4c4b53d312a3ca5f1378f6440fc9", // Vinegar Syndrome - "957d0f44b592285f26449575e8b1167e", // Special Edition - "eecf3a857724171f968a66cb5719e152", // IMAX - "9f6cbff8cfe4ebbc1bde14c7b7bec0de", // IMAX Enhanced - // HQ Release Groups - "3a3ff47579026e76d6504ebea39390de", // Remux Tier 01 - "9f98181fe5a3fbeb0cc29340da2a468a", // Remux Tier 02 - "c20f169ef63c5f40c2def54abaf4438e", // WEB Tier 01 - "403816d65392c79236dcb6dd591aeda4", // WEB Tier 02 - "af94e0fe497124d1f9ce732069ec8c3b", // WEB Tier 03 - // Misc - "e7718d7a3ce595f289bfee26adc178f5", // Repack/Proper - "ae43b294509409a6a13919dedd4764c4", // Repack2 - // Unwanted - "ed38b889b31be83fda192888e2286d83", // BR-DISK - "90a6f9a284dff5103f6346090e6280c8", // LQ - "dc98083864ea246d05a42df0d05f81cc", // x265 (HD) - "b8cd450cbfa689c0259a01d9e29ba3d6", // 3D - // Streaming Services - "cc5e51a9e85a6296ceefe097a77f12f4", // BCORE - "2a6039655313bf5dab1e43523b62c374", // MA - ] - quality_profiles: [{ - name: "Remux + WEB 1080p" - }] - }, { - trash_ids: [ - // Streaming Services - "b3b3a6ac74ecbd56bcdbefa4799fb9df", // AMZN - "40e9380490e748672c2522eaaeb692f7", // ATVP - "84272245b2988854bfb76a16e60baea5", // DSNP - "509e5f41146e278f9eab1ddaceb34515", // HBO - "5763d1b0ce84aff3b21038eea8e9b8ad", // HMAX - "526d445d4c16214309f0fd2b3be18a89", // Hulu - "170b1d363bd8516fbf3a3eb05d4faff6", // NF - "c9fd353f8f5f1baf56dc601c4cb29920", // PCOK - "e36a0ba1bc902b26ee40818a1d59b8bd", // PMTP - "c2863d2a50c9acad1fb50e53ece60817", // STAN - ] - quality_profiles: [{ - name: "Remux + WEB 1080p" - score: 0 - }] - }, { - trash_ids: [ - // Anime CF/Scoring - "fb3ccc5d5cc8f77c9055d4cb4561dded", // Anime BD Tier 01 (Top SeaDex Muxers) - "66926c8fa9312bc74ab71bf69aae4f4a", // Anime BD Tier 02 (SeaDex Muxers) - "fa857662bad28d5ff21a6e611869a0ff", // Anime BD Tier 03 (SeaDex Muxers) - "f262f1299d99b1a2263375e8fa2ddbb3", // Anime BD Tier 04 (SeaDex Muxers) - "ca864ed93c7b431150cc6748dc34875d", // Anime BD Tier 05 (Remuxes) - "9dce189b960fddf47891b7484ee886ca", // Anime BD Tier 06 (FanSubs) - "1ef101b3a82646b40e0cab7fc92cd896", // Anime BD Tier 07 (P2P/Scene) - "6115ccd6640b978234cc47f2c1f2cadc", // Anime BD Tier 08 (Mini Encodes) - "8167cffba4febfb9a6988ef24f274e7e", // Anime Web Tier 01 (Muxers) - "8526c54e36b4962d340fce52ef030e76", // Anime Web Tier 02 (Top FanSubs) - "de41e72708d2c856fa261094c85e965d", // Anime Web Tier 03 (Official Subs) - "9edaeee9ea3bcd585da9b7c0ac3fc54f", // Anime Web Tier 04 (Official Subs) - "22d953bbe897857b517928f3652b8dd3", // Anime Web Tier 05 (FanSubs) - "a786fbc0eae05afe3bb51aee3c83a9d4", // Anime Web Tier 06 (FanSubs) - "b0fdc5897f68c9a68c70c25169f77447", // Anime LQ Groups - "c259005cbaeb5ab44c06eddb4751e70c", // v0 - "5f400539421b8fcf71d51e6384434573", // v1 - "3df5e6dfef4b09bb6002f732bed5b774", // v2 - "db92c27ba606996b146b57fbe6d09186", // v3 - "d4e5e842fad129a3c097bdb2d20d31a0", // v4 - // Anime Streaming Services - "60f6d50cbd3cfc3e9a8c00e3a30c3114", // VRV - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - }] - }, { - trash_ids: [ - "9172b2f683f6223e3a1846427b417a3d", // VOSTFR - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }, { - trash_ids: [ - "3a3ff47579026e76d6504ebea39390de", // Remux Tier 01 - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 1050 - }] - }, { - trash_ids: [ - "9f98181fe5a3fbeb0cc29340da2a468a", // Remux Tier 02 - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 1000 - }] - }, { - trash_ids: [ - "4a3b087eea2ce012fcc1ce319259a3be", // Anime Dual Audio - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "064af5f084a0a24458cc8ecd3220f93f", // Uncensored - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "a5d148168c4506b55cf53984107c396e", // 10bit - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "06b6542a47037d1e33b15aa3677c2365", // Anime Raws - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }, { - trash_ids: [ - "b23eae459cc960816f2d6ba84af45055", // Dubs Only - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }] - } - sonarr: main: { - base_url: "http://sonarr" - // An "env_var!" tag is added by an init container. - // - // https://recyclarr.dev/wiki/yaml/env-vars - api_key: "SONARR_API_KEY" - quality_definition: type: "series" - quality_profiles: [{ - name: "WEB-2160p" - reset_unmatched_scores: true - }, { - name: "WEB-1080p" - reset_unmatched_scores: true - }, { - name: "Remux-1080p - Anime" - reset_unmatched_scores: true - }] - custom_formats: [{ - trash_ids: [ - // HDR Formats - "7878c33f1963fefb3d6c8657d46c2f0a", // DV HDR10 - "1f733af03141f068a540eec352589a89", // DV HLG - "27954b0a80aab882522a88a4d9eae1cd", // DV SDR - "6d0d8de7b57e35518ac0308b0ddf404e", // DV - "bb019e1cd00f304f80971c965de064dc", // HDR (undefined) - "3e2c4e748b64a1a1118e0ea3f4cf6875", // HDR - "3497799d29a085e2ac2df9d468413c94", // HDR10 - "a3d82cbef5039f8d295478d28a887159", // HDR10+ - "17e889ce13117940092308f48b48b45b", // HLG - "2a7e3be05d3861d6df7171ec74cad727", // PQ - // DV (WEBDL) - The next line is uncommented by default, and ensures that releases with Dolby Vision will only be grabbed if they have HDR10 fallback. You can comment the line out if you do not need HDR10 fallback - "9b27ab6498ec0f31a3353992e19434ca", // DV (WEBDL) - // HDR10Plus Boost - Uncomment the next line if any of your devices DO support HDR10+ - // - 0dad0a507451acddd754fe6dc3a7f5e7 // HDR10Plus Boost - // Unwanted UHD - "85c61753df5da1fb2aab6f2a47426b09", // BR-DISK - "9c11cd3f07101cdba90a2d81cf0e56b4", // LQ - "2016d1676f5ee13a5b7257ff86ac9a93", // SDR - // Misc - "ec8fa7296b64e8cd390a1600981f3923", // Repack/Proper - "eb3d5cc0a2be0db205fb823640db6a3c", // Repack v2 - "44e7c4de10ae50265753082e5dc76047", // Repack v3 - // Streaming Services - "d660701077794679fd59e8bdf4ce3a29", // AMZN - "f67c9ca88f463a48346062e8ad07713f", // ATVP - "36b72f59f4ea20aad9316f475f2d9fbb", // DCU - "89358767a60cc28783cdc3d0be9388a4", // DSNP - "7a235133c87f7da4c8cccceca7e3c7a6", // HBO - "a880d6abc21e7c16884f3ae393f84179", // HMAX - "f6cce30f1733d5c8194222a7507909bb", // HULU - "0ac24a2a68a9700bcb7eeca8e5cd644c", // iT - "d34870697c9db575f17700212167be23", // NF - "b2b980877494b560443631eb1f473867", // NLZ - "1656adc6d7bb2c8cca6acfb6592db421", // PCOK - "c67a75ae4a1715f2bb4d492755ba4195", // PMTP - "3ac5d84fce98bab1b531393e9c82f467", // QIBI - "c30d2958827d1867c73318a5a2957eb1", // RED - "ae58039e1319178e6be73caab5c42166", // SHO - "1efe8da11bfd74fbbcd4d8117ddb9213", // STAN - "5d2317d99af813b6529c7ebf01c83533", // VDL - "77a7b25585c18af08f60b1547bb9b4fb", // CC - // HQ Source Groups - "e6258996055b9fbab7e9cb2f75819294", // WEB Tier 01 - "58790d4e2fdcd9733aa7ae68ba2bb503", // WEB Tier 02 - "d84935abd3f8556dcd51d4f27e22d0a6", // WEB Tier 03 - "d0c516558625b04b363fa6c5c2c7cfd4", // WEB Scene - ] - quality_profiles: [{ - name: "WEB-2160p" - }] - }, { - trash_ids: [ - // Unwanted - "85c61753df5da1fb2aab6f2a47426b09", // BR-DISK - "9c11cd3f07101cdba90a2d81cf0e56b4", // LQ - "47435ece6b99a0b477caf360e79ba0bb", // x265 (HD) - // Misc - "ec8fa7296b64e8cd390a1600981f3923", // Repack/Proper - "eb3d5cc0a2be0db205fb823640db6a3c", // Repack v2 - "44e7c4de10ae50265753082e5dc76047", // Repack v3 - // Streaming Services - "d660701077794679fd59e8bdf4ce3a29", // AMZN - "f67c9ca88f463a48346062e8ad07713f", // ATVP - "36b72f59f4ea20aad9316f475f2d9fbb", // DCU - "89358767a60cc28783cdc3d0be9388a4", // DSNP - "7a235133c87f7da4c8cccceca7e3c7a6", // HBO - "a880d6abc21e7c16884f3ae393f84179", // HMAX - "f6cce30f1733d5c8194222a7507909bb", // HULU - "0ac24a2a68a9700bcb7eeca8e5cd644c", // iT - "d34870697c9db575f17700212167be23", // NF - "b2b980877494b560443631eb1f473867", // NLZ - "1656adc6d7bb2c8cca6acfb6592db421", // PCOK - "c67a75ae4a1715f2bb4d492755ba4195", // PMTP - "3ac5d84fce98bab1b531393e9c82f467", // QIBI - "c30d2958827d1867c73318a5a2957eb1", // RED - "ae58039e1319178e6be73caab5c42166", // SHO - "1efe8da11bfd74fbbcd4d8117ddb9213", // STAN - "5d2317d99af813b6529c7ebf01c83533", // VDL - "77a7b25585c18af08f60b1547bb9b4fb", // CC - // HQ Source Groups - "e6258996055b9fbab7e9cb2f75819294", // WEB Tier 01 - "58790d4e2fdcd9733aa7ae68ba2bb503", // WEB Tier 02 - "d84935abd3f8556dcd51d4f27e22d0a6", // WEB Tier 03 - "d0c516558625b04b363fa6c5c2c7cfd4", // WEB Scene - ] - quality_profiles: [{ - name: "WEB-1080p" - }] - }, { - trash_ids: [ - // Anime CF/Scoring - "949c16fe0a8147f50ba82cc2df9411c9", // Anime BD Tier 01 (Top SeaDex Muxers) - "ed7f1e315e000aef424a58517fa48727", // Anime BD Tier 02 (SeaDex Muxers) - "096e406c92baa713da4a72d88030b815", // Anime BD Tier 03 (SeaDex Muxers) - "30feba9da3030c5ed1e0f7d610bcadc4", // Anime BD Tier 04 (SeaDex Muxers) - "545a76b14ddc349b8b185a6344e28b04", // Anime BD Tier 05 (Remuxes) - "25d2afecab632b1582eaf03b63055f72", // Anime BD Tier 06 (FanSubs) - "0329044e3d9137b08502a9f84a7e58db", // Anime BD Tier 07 (P2P/Scene) - "c81bbfb47fed3d5a3ad027d077f889de", // Anime BD Tier 08 (Mini Encodes) - "e0014372773c8f0e1bef8824f00c7dc4", // Anime Web Tier 01 (Muxers) - "19180499de5ef2b84b6ec59aae444696", // Anime Web Tier 02 (Top FanSubs) - "c27f2ae6a4e82373b0f1da094e2489ad", // Anime Web Tier 03 (Official Subs) - "4fd5528a3a8024e6b49f9c67053ea5f3", // Anime Web Tier 04 (Official Subs) - "29c2a13d091144f63307e4a8ce963a39", // Anime Web Tier 05 (FanSubs) - "dc262f88d74c651b12e9d90b39f6c753", // Anime Web Tier 06 (FanSubs) - "e3515e519f3b1360cbfc17651944354c", // Anime LQ Groups - "d2d7b8a9d39413da5f44054080e028a3", // v0 - "273bd326df95955e1b6c26527d1df89b", // v1 - "228b8ee9aa0a609463efca874524a6b8", // v2 - "0e5833d3af2cc5fa96a0c29cd4477feb", // v3 - "4fc15eeb8f2f9a749f918217d4234ad8", // v4 - // Anime Streaming Services - "d660701077794679fd59e8bdf4ce3a29", // AMZN - "3e0b26604165f463f3e8e192261e7284", // CR - "89358767a60cc28783cdc3d0be9388a4", // DSNP - "1284d18e693de8efe0fe7d6b3e0b9170", // FUNi - "d34870697c9db575f17700212167be23", // NF - "44a8ee6403071dd7b8a3a8dd3fe8cb20", // VRV - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - }] - }, { - trash_ids: [ - // Anime Streaming Services - "7dd31f3dee6d2ef8eeaa156e23c3857e", // B-Global - "4c67ff059210182b59cdd41697b8cb08", // Bilibili - "570b03b3145a25011bf073274a407259", // HIDIVE - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "15a05bc7c1a36e2b57fd628f8977e2fc", // AV1 - "07a32f77690263bb9fda1842db7e273f", // VOSTFR - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }, { - trash_ids: [ - "e6258996055b9fbab7e9cb2f75819294", // WEB Tier 01 - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 450 - }] - }, { - trash_ids: [ - "58790d4e2fdcd9733aa7ae68ba2bb503", // WEB Tier 02 - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 400 - }] - }, { - trash_ids: [ - "d84935abd3f8556dcd51d4f27e22d0a6", // WEB Tier 03 - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 350 - }] - }, { - trash_ids: [ - "418f50b10f1907201b6cfdf881f467b7", // Anime Dual Audio - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "026d5aadd1a6b4e550b134cb6c72b3ca", // Uncensored - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "b2550eb333d27b75833e25b8c2557b38", // 10bit - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: 0 - }] - }, { - trash_ids: [ - "b4a1b3d705159cdca36d71e57ca86871", // Anime Raws - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }, { - trash_ids: [ - "9c14d194486c4014d422adc64092d794", // Dubs Only - ] - quality_profiles: [{ - name: "Remux-1080p - Anime" - score: -10000 - }] - }] - } - }) -}] diff --git a/k8s/unwind/media/recyclarr/cron_job_list.cue b/k8s/unwind/media/recyclarr/cron_job_list.cue deleted file mode 100644 index 455ecd41e..000000000 --- a/k8s/unwind/media/recyclarr/cron_job_list.cue +++ /dev/null @@ -1,138 +0,0 @@ -package recyclarr - -import ( - "k8s.io/api/core/v1" - batchv1 "k8s.io/api/batch/v1" -) - -#CronJobList: batchv1.#CronJobList & { - apiVersion: "batch/v1" - kind: "CronJobList" - items: [...{ - apiVersion: "batch/v1" - kind: "CronJob" - }] -} - -#CronJobList: items: [{ - let configDirectory = "/etc/\(#Name)" - let configPath = "\(configDirectory)/config.yaml" - spec: { - schedule: "0 0 * * *" // every day - concurrencyPolicy: batchv1.#ForbidConcurrent - jobTemplate: spec: template: spec: { - volumes: [{ - name: "config-init" - configMap: name: #Name - }, { - name: "config" - emptyDir: {} - }, { - name: "tmp" - emptyDir: {} - }, { - name: "secrets-store-inline" - csi: { - driver: "secrets-store.csi.k8s.io" - readOnly: true - volumeAttributes: secretProviderClass: #Name - } - }] - // CUE doesn't support writing YAML tags. - // - // https://github.com/cue-lang/cue/issues/2316 - initContainers: [{ - let initConfigPath = "/tmp/init/config.yaml" - name: "copy-config" - image: "alpine:3.17.2@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501" - command: ["cp"] - args: [initConfigPath, configPath] - volumeMounts: [{ - name: "config-init" - mountPath: initConfigPath - subPath: "config.yaml" - }, { - name: "config" - mountPath: configDirectory - subPath: "config.yaml" - }] - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }, { - name: "yaml-tags" - image: "mikefarah/yq:4.33.1@sha256:ddf60fa876a4f73414477fab551bcfb864a179cad6ce998b13ba4180e0f5702d" - args: ["-i", ".[][].api_key tag = \"!env_var\"", configPath] - volumeMounts: [{ - name: "config" - mountPath: configDirectory - subPath: "config.yaml" - }, { - name: "tmp" - mountPath: "/tmp" - }] - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - containers: [{ - name: #Name - image: "recyclarr/recyclarr:\(#Version)@sha256:96f7922eb444c68f73a71e993ff6d834f7668010b38b07925f8b76adff5ac862" - command: ["recyclarr"] - args: ["sync", "-c", configPath] - env: [{ - // .NET CoreCLR crashes when run - // in a container with a - // read-only filesystem. - // - // https://github.com/Radarr/Radarr/issues/7030#issuecomment-1039689518 - // https://github.com/dotnet/runtime/issues/9336 - name: "COMPlus_EnableDiagnostics" - value: "0" - }, { - name: "RADARR_API_KEY" - valueFrom: secretKeyRef: { - name: "\(#Name)-api-keys" - key: "radarr-api-key" - } - }, { - name: "SONARR_API_KEY" - valueFrom: secretKeyRef: { - name: "\(#Name)-api-keys" - key: "sonarr-api-key" - } - }] - volumeMounts: [{ - name: "config" - mountPath: configDirectory - subPath: "config.yaml" - }, { - name: "secrets-store-inline" - readOnly: true - mountPath: "/mnt/secrets-store" - }] - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - capabilities: drop: ["ALL"] - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - restartPolicy: v1.#RestartPolicyOnFailure - serviceAccountName: #Name - securityContext: { - runAsUser: 1000 - runAsGroup: 3000 - runAsNonRoot: true - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } -}] diff --git a/k8s/unwind/media/recyclarr/list.cue b/k8s/unwind/media/recyclarr/list.cue deleted file mode 100644 index ffc10ae4c..000000000 --- a/k8s/unwind/media/recyclarr/list.cue +++ /dev/null @@ -1,33 +0,0 @@ -package recyclarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "recyclarr" -#Version: "4.4.0" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ConfigMapList.items, - #CronJobList.items, - #SecretProviderClassList.items, - #ServiceAccountList.items, -] diff --git a/k8s/unwind/media/recyclarr/secret_provider_class_list.cue b/k8s/unwind/media/recyclarr/secret_provider_class_list.cue deleted file mode 100644 index 6e5080f15..000000000 --- a/k8s/unwind/media/recyclarr/secret_provider_class_list.cue +++ /dev/null @@ -1,46 +0,0 @@ -package recyclarr - -import ( - "encoding/yaml" - - "k8s.io/api/core/v1" -) - -#SecretProviderClassList: v1.#List & { - apiVersion: "secrets-store.csi.x-k8s.io/v1" - kind: "SecretProviderClassList" - items: [...{ - apiVersion: "secrets-store.csi.x-k8s.io/v1" - kind: "SecretProviderClass" - }] -} - -#SecretProviderClassList: items: [{ - spec: { - provider: "vault" - secretObjects: [{ - secretName: "\(#Name)-api-keys" - type: v1.#SecretTypeOpaque - data: [{ - key: "radarr-api-key" - objectName: key - }, { - key: "sonarr-api-key" - objectName: key - }] - }] - parameters: { - roleName: "media-recyclarr-read" - vaultAddress: "http://vault.vault:8200" - objects: yaml.Marshal([{ - secretPath: "secret/data/kubernetes/unwind/media/radarr-api-key" - objectName: "radarr-api-key" - secretKey: "key" - }, { - secretPath: "secret/data/kubernetes/unwind/media/sonarr-api-key" - objectName: "sonarr-api-key" - secretKey: "key" - }]) - } - } -}] diff --git a/k8s/unwind/media/recyclarr/service_account_list.cue b/k8s/unwind/media/recyclarr/service_account_list.cue deleted file mode 100644 index a29f20137..000000000 --- a/k8s/unwind/media/recyclarr/service_account_list.cue +++ /dev/null @@ -1,14 +0,0 @@ -package recyclarr - -import "k8s.io/api/core/v1" - -#ServiceAccountList: v1.#ServiceAccountList & { - apiVersion: "v1" - kind: "ServiceAccountList" - items: [...{ - apiVersion: "v1" - kind: "ServiceAccount" - }] -} - -#ServiceAccountList: items: [{}] diff --git a/k8s/unwind/media/sabnzbd/BUILD.bazel b/k8s/unwind/media/sabnzbd/BUILD.bazel deleted file mode 100644 index bc466bbc2..000000000 --- a/k8s/unwind/media/sabnzbd/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_sabnzbd_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/sabnzbd", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/sabnzbd/README.md b/k8s/unwind/media/sabnzbd/README.md deleted file mode 100644 index ee0901158..000000000 --- a/k8s/unwind/media/sabnzbd/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# SABnzbd - -https://sabnzbd.org/ - -The service by default uses download paths based on the location of the -config file. They must be changed to `/media/downloads/incomplete` and -`/media/downloads/complete` respectively. diff --git a/k8s/unwind/media/sabnzbd/list.cue b/k8s/unwind/media/sabnzbd/list.cue deleted file mode 100644 index c8983cd2a..000000000 --- a/k8s/unwind/media/sabnzbd/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package sabnzbd - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "sabnzbd" -#Version: "3.7.2-ls99" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/sabnzbd/service_list.cue b/k8s/unwind/media/sabnzbd/service_list.cue deleted file mode 100644 index 26ce69da9..000000000 --- a/k8s/unwind/media/sabnzbd/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package sabnzbd - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/sabnzbd/stateful_set_list.cue b/k8s/unwind/media/sabnzbd/stateful_set_list.cue deleted file mode 100644 index d33f46f52..000000000 --- a/k8s/unwind/media/sabnzbd/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package sabnzbd - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/sabnzbd:\(#Version)@sha256:7e8ff720e50ffec60307f001e1478ffac20b97b818f3b5e9a96b742a8009b730" - ports: [{ - name: "http" - containerPort: 8080 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "4" - (v1.#ResourceMemory): "4Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/sonarr/BUILD.bazel b/k8s/unwind/media/sonarr/BUILD.bazel deleted file mode 100644 index 2f9f80c81..000000000 --- a/k8s/unwind/media/sonarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_sonarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/sonarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/sonarr/README.md b/k8s/unwind/media/sonarr/README.md deleted file mode 100644 index 65edbcfeb..000000000 --- a/k8s/unwind/media/sonarr/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Sonarr - -https://sonarr.tv/ - -The service must have the root folder `/media/shows` added to work correctly. diff --git a/k8s/unwind/media/sonarr/list.cue b/k8s/unwind/media/sonarr/list.cue deleted file mode 100644 index dfae9afe1..000000000 --- a/k8s/unwind/media/sonarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package sonarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "sonarr" -#Version: "4.0.0-develop" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/sonarr/service_list.cue b/k8s/unwind/media/sonarr/service_list.cue deleted file mode 100644 index 3ab408716..000000000 --- a/k8s/unwind/media/sonarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package sonarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/sonarr/stateful_set_list.cue b/k8s/unwind/media/sonarr/stateful_set_list.cue deleted file mode 100644 index f5a4aa301..000000000 --- a/k8s/unwind/media/sonarr/stateful_set_list.cue +++ /dev/null @@ -1,92 +0,0 @@ -package sonarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/sonarr:\(#Version)@sha256:6e25101a7bdeb29cab23c50ad33c73073bd0e989ab2a8d0f7a2bd79b79b9a172" - ports: [{ - name: "http" - containerPort: 8989 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/tdarr/BUILD.bazel b/k8s/unwind/media/tdarr/BUILD.bazel deleted file mode 100644 index 5830f4219..000000000 --- a/k8s/unwind/media/tdarr/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_tdarr_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/tdarr", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/tdarr/README.md b/k8s/unwind/media/tdarr/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/k8s/unwind/media/tdarr/list.cue b/k8s/unwind/media/tdarr/list.cue deleted file mode 100644 index 55af81201..000000000 --- a/k8s/unwind/media/tdarr/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package tdarr - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "tdarr" -#Version: "dev_2.00.21_2023_04_08T16_19_10z" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/tdarr/service_list.cue b/k8s/unwind/media/tdarr/service_list.cue deleted file mode 100644 index 13a1b22d2..000000000 --- a/k8s/unwind/media/tdarr/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package tdarr - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/tdarr/stateful_set_list.cue b/k8s/unwind/media/tdarr/stateful_set_list.cue deleted file mode 100644 index 77823e321..000000000 --- a/k8s/unwind/media/tdarr/stateful_set_list.cue +++ /dev/null @@ -1,112 +0,0 @@ -package tdarr - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "haveagitgat/tdarr_acc:\(#Version)" - // image: "ghcr.io/haveagitgat/tdarr:\(#Version)@sha256:75e128ebb10f769615e5878fc2dad618adbd17a01e3a96060338e28dc8978a1c" - ports: [{ - name: "http" - containerPort: 8265 - }, { - name: "server" - containerPort: 8266 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }, { - name: "POD_NAME" - valueFrom: fieldRef: fieldPath: "metadata.name" - }, { - name: "nodeName" - value: "$(POD_NAME)" - }, { - name: "internalNode" - value: "true" - }] - resources: { - limits: { - (v1.#ResourceCPU): "2" - memory: "8Gi" - "gpu.intel.com/i915": 1 - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/app/configs" - }, { - name: "server" - mountPath: "/app/server" - }, { - name: "media" - mountPath: "/media" - }] - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }, { - metadata: name: "server" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}] diff --git a/k8s/unwind/media/transmission/BUILD.bazel b/k8s/unwind/media/transmission/BUILD.bazel deleted file mode 100644 index e6b3d2807..000000000 --- a/k8s/unwind/media/transmission/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@com_github_tnarg_rules_cue//cue:cue.bzl", "cue_library") - -cue_library( - name = "cue_transmission_library", - srcs = [ - "list.cue", - "service_list.cue", - "stateful_set_list.cue", - ], - importpath = "github.com/uhthomas/automata/k8s/unwind/media/transmission", - visibility = ["//visibility:public"], - deps = [ - "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library", - "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library", - ], -) diff --git a/k8s/unwind/media/transmission/README.md b/k8s/unwind/media/transmission/README.md deleted file mode 100644 index b1e1b980c..000000000 --- a/k8s/unwind/media/transmission/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Transmission - -https://transmissionbt.com/ - -The service by default uses download paths based on the location of the -config file. They must be changed to `/media/downloads/incomplete` and -`/media/downloads/complete` respectively. diff --git a/k8s/unwind/media/transmission/list.cue b/k8s/unwind/media/transmission/list.cue deleted file mode 100644 index 6f5194bae..000000000 --- a/k8s/unwind/media/transmission/list.cue +++ /dev/null @@ -1,31 +0,0 @@ -package transmission - -import ( - "list" - - "k8s.io/api/core/v1" -) - -#Name: "transmission" -#Version: "4.0.2" - -#List: v1.#List & { - apiVersion: "v1" - kind: "List" - items: [...{ - metadata: { - name: string | *#Name - labels: { - "app.kubernetes.io/name": #Name - "app.kubernetes.io/version": #Version - } - } - }] -} - -#List: items: list.Concat(_items) - -_items: [ - #ServiceList.items, - #StatefulSetList.items, -] diff --git a/k8s/unwind/media/transmission/service_list.cue b/k8s/unwind/media/transmission/service_list.cue deleted file mode 100644 index 7d82d4864..000000000 --- a/k8s/unwind/media/transmission/service_list.cue +++ /dev/null @@ -1,26 +0,0 @@ -package transmission - -import "k8s.io/api/core/v1" - -#ServiceList: v1.#ServiceList & { - apiVersion: "v1" - kind: "ServiceList" - items: [...{ - apiVersion: "v1" - kind: "Service" - }] -} - -#ServiceList: items: [{ - metadata: annotations: "tailscale.com/hostname": "\(#Name)-unwind-k8s" - spec: { - ports: [{ - name: "http" - port: 80 - targetPort: "http" - }] - selector: "app.kubernetes.io/name": #Name - type: v1.#ServiceTypeLoadBalancer - loadBalancerClass: "tailscale" - } -}] diff --git a/k8s/unwind/media/transmission/stateful_set_list.cue b/k8s/unwind/media/transmission/stateful_set_list.cue deleted file mode 100644 index fc84bff32..000000000 --- a/k8s/unwind/media/transmission/stateful_set_list.cue +++ /dev/null @@ -1,95 +0,0 @@ -package transmission - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" -) - -#StatefulSetList: appsv1.#StatefulSetList & { - apiVersion: "apps/v1" - kind: "StatefulSetList" - items: [...{ - apiVersion: "apps/v1" - kind: "StatefulSet" - }] -} - -#StatefulSetList: items: [{ - spec: { - selector: matchLabels: "app.kubernetes.io/name": #Name - template: { - metadata: labels: "app.kubernetes.io/name": #Name - spec: { - volumes: [{ - name: "media" - persistentVolumeClaim: claimName: "media" - }] - containers: [{ - name: #Name - image: "linuxserver/transmission:\(#Version)@sha256:96dc383c0451c63185d21713c4f248d8b856e67627301dc21137612e6bb967e2" - ports: [{ - name: "http" - containerPort: 9091 - }, { - name: "torrent" - containerPort: 51413 - }] - env: [{ - name: "PUID" - value: "1000" - }, { - name: "PGID" - value: "3000" - }] - resources: { - limits: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "2Gi" - } - requests: { - (v1.#ResourceCPU): "1" - (v1.#ResourceMemory): "1Gi" - } - } - volumeMounts: [{ - name: "config" - mountPath: "/config" - }, { - name: "media" - mountPath: "/media" - }] - livenessProbe: httpGet: { - path: "/health" - port: "http" - } - imagePullPolicy: v1.#PullIfNotPresent - securityContext: { - // capabilities: drop: ["ALL"] - // readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - } - }] - // The s6 overlay requires root... It may be - // better to build our own image instead. - // - // https://github.com/linuxserver/docker-radarr/issues/203 - securityContext: { - runAsUser: 0 - runAsGroup: 0 - runAsNonRoot: false - fsGroup: 2000 - seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault - } - } - } - volumeClaimTemplates: [{ - metadata: name: "config" - spec: { - accessModes: [v1.#ReadWriteOnce] - storageClassName: "rook-ceph-nvme-ec-delete-block" - resources: requests: (v1.#ResourceStorage): "32Gi" - } - }] - serviceName: #Name - } -}]