Skip to content

Commit

Permalink
feat(downloadarr): add recyclarr with a base config
Browse files Browse the repository at this point in the history
  • Loading branch information
kid committed Aug 30, 2024
1 parent 1edad85 commit 6bc0bd6
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 34 deletions.
6 changes: 6 additions & 0 deletions clusters/base/apps/downloadarr/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace: downloadarr
resources:
- ./namespace.yaml
- ./pv-series.yaml
- ./pv-recyclarr.yaml
- ./gateway.yaml
- ./prowlarr.yaml
- ./sonarr.yaml
- ./recyclarr.yaml
configMapGenerator:
- name: recyclarr-config
files:
- recyclarr.yml=./resources/recyclarr.yaml
2 changes: 1 addition & 1 deletion clusters/base/apps/downloadarr/prowlarr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
valueFrom:
secretKeyRef:
name: api-keys
key: PROWLARR__AUTH__APIKEY
key: PROWLARR_API_KEY
- name: PROWLARR__LOG__ANALYTICSENABLED
value: "False"
- name: PROWLARR__LOG__CONSOLEFORMAT
Expand Down
28 changes: 28 additions & 0 deletions clusters/base/apps/downloadarr/pv-recyclarr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: recyclarr
spec:
capacity:
storage: 1Mi
accessModes:
- ReadWriteMany
mountOptions:
- nfsvers=4
- noatime
nfs:
server: 10.0.30.126
path: /mnt/tank/apps-dev/recyclarr
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: recyclarr
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1Mi
volumeName: recyclarr
83 changes: 83 additions & 0 deletions clusters/base/apps/downloadarr/recyclarr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: recyclarr
labels:
app.kubernetes.io/component: recyclarr
app.kubernetes.io/instance: downloadarr
app.kubernetes.io/name: recyclarr
spec:
suspend: false
concurrencyPolicy: Forbid
startingDeadlineSeconds: 30
schedule: "@daily"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
backoffLimit: 6
template:
metadata:
labels:
app.kubernetes.io/component: recyclarr
app.kubernetes.io/instance: downloadarr
app.kubernetes.io/name: recyclarr
spec:
enableServiceLinks: false
serviceAccountName: default
automountServiceAccountToken: true
securityContext:
fsGroup: 1215
fsGroupChangePolicy: OnRootMismatch
runAsGroup: 1215
runAsNonRoot: true
runAsUser: 3005
seccompProfile:
type: RuntimeDefault
hostIPC: false
hostNetwork: false
hostPID: false
dnsPolicy: ClusterFirst
restartPolicy: Never
containers:
- args:
- sync
- -c
- /recyclarr.yml
env:
- name: TZ
value: Europe/Brussels
envFrom:
- secretRef:
name: api-keys
image: ghcr.io/recyclarr/recyclarr:7.2.2@sha256:149eacfb27a51e001c50b60bf6b0eeae15c4dbbde46a1e1d30bf11032ef7f734
name: app
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /config
name: config
- mountPath: /recyclarr.yml
name: config-file
readOnly: true
subPath: recyclarr.yml
- mountPath: /config/logs
name: config-logs
volumes:
- name: config
persistentVolumeClaim:
claimName: recyclarr
- configMap:
name: recyclarr-config
name: config-file
- emptyDir: {}
name: config-logs
65 changes: 65 additions & 0 deletions clusters/base/apps/downloadarr/resources/recyclarr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/recyclarr/recyclarr/master/schemas/config-schema.json
sonarr:
sonarr:
base_url: http://sonarr.default.svc.cluster.local
api_key: !env_var SONARR_API_KEY
delete_old_custom_formats: true
replace_existing_custom_formats: true
include:
- template: sonarr-quality-definition-series
- template: sonarr-v4-quality-profile-web-1080p
- template: sonarr-v4-custom-formats-web-1080p
quality_profiles:
- name: WEB-1080p
- name: ANY
reset_unmatched_scores:
enabled: true
upgrade:
allowed: true
until_quality: WEB 1080p
until_score: 10000
quality_sort: top
qualities:
- name: WEB 1080p
qualities: ["WEBDL-1080p", "WEBRip-1080p"]
- name: HDTV-1080p
- name: WEB 720p
qualities: ["WEBDL-720p", "WEBRip-720p"]
- name: HDTV-720p
- name: WEB 480p
qualities: ["WEBDL-480p", "WEBRip-480p"]
- name: DVD
- name: SDTV
custom_formats:
- trash_ids:
- 32b367365729d530ca1c124a0b180c64 # Bad Dual Groups
- 82d40da2bc6923f41e14394075dd4b03 # No-RlsGroup
- e1a997ddb54e3ecbfe06341ad323c458 # Obfuscated
- 06d66ab109d4d2eddb2794d21526d140 # Retags
- 1b3994c551cbb92a2c781af061f4ab44 # Scene
assign_scores_to:
- name: WEB-1080p
- name: ANY
# radarr:
# radarr:
# base_url: http://radarr.default.svc.cluster.local
# api_key: !env_var RADARR_API_KEY
# delete_old_custom_formats: true
# replace_existing_custom_formats: true
# quality_profiles:
# - name: SQP-1 (2160p)
# include:
# - template: radarr-quality-definition-sqp-streaming
# - template: radarr-quality-profile-sqp-1-2160p-default
# - template: radarr-custom-formats-sqp-1-2160p
# custom_formats:
# - trash_ids:
# - 7a0d1ad358fee9f5b074af3ef3f9d9ef # hallowed
# - b6832f586342ef70d9c128d40c07b872 # Bad Dual Groups
# - 90cedc1fea7ea5d11298bebd3d1d3223 # EVO (no WEBDL)
# - ae9b7c9ebde1f3bd336a8cbd1ec4c5e5 # No-RlsGroup
# - 7357cf5161efbf8c4d5d0c30b4815ee2 # Obfuscated
# - 5c44f52a8714fdd79bb4d98e2673be1f # Retags
# - f537cf427b64c38c8e36298f657e4828 # Scene
# assign_scores_to:
# - name: SQP-1 (2160p)
2 changes: 1 addition & 1 deletion clusters/base/apps/downloadarr/sonarr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
valueFrom:
secretKeyRef:
name: api-keys
key: SONARR__AUTH__APIKEY
key: SONARR_API_KEY
- name: SONARR__LOG__ANALYTICSENABLED
value: "False"
- name: SONARR__LOG__CONSOLEFORMAT
Expand Down
63 changes: 31 additions & 32 deletions clusters/talos.kidibox.net/apps/downloadarr/api-keys.sops.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
# https://kubernetes.io/docs/concepts/configuration/secret/
apiVersion: v1
kind: Secret
metadata:
name: api-keys
name: api-keys
type: Opaque
stringData:
SONARR__AUTH__APIKEY: ENC[AES256_GCM,data:3EmQno9hdBUt67sZYCgwcJNMq+s=,iv:C6UZbOjGcPwfLdxPstIzyJeHNWPdy5jcwiy96cLLRlU=,tag:pth+Ym4adAR4kuNoKrrffg==,type:str]
PROWLARR__AUTH__APIKEY: ENC[AES256_GCM,data:CGlLMuanf1hVyvpkotPE1+2nOd0=,iv:R+X0ottx59KajDWs2fWZ+OkUHj2xa9adtuHmOidadTU=,tag:OU5TmYQfJPEBHn7huYgRdg==,type:str]
SONARR_API_KEY: ENC[AES256_GCM,data:9K+cCYDM0dMFlYyr0oyoF+RuxGo=,iv:ucK6FRmBl9PdbvFB21SUaxSCqHGgZP1qlKbMrVZMYAQ=,tag:dC34I07RJA9Cun3lObxqnQ==,type:str]
PROWLARR_API_KEY: ENC[AES256_GCM,data:8QlN6UClQbSiH7RAC5+qLRCUYYo=,iv:M77L/ILXgm45IyQzVrB+RWF0D0h3ZMMekteqlLqUY1Q=,tag:wUnSZMH/VbiQ2MwqWXSC+Q==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1dghfu7sxwlkf4626eywmgr63y2g7m4x8zs8a6xt2zay3x7dclpnsw776dd
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlazJvdmNCTWV2eWpWc0ll
WFdWK0l0b0pIMFVvTzd1THdacExTQzBRaVFzCmtlc2Zzcktrbk03UjRZaWZBRGFQ
QUszN0RQcE1TUWs5alhMdk1LZmxmalUKLS0tIHBISmZ5dTM5VkhBRG5wa0ZZbmVl
OEpTK0s0eW5vTlNaS05UcmhWRFBsMXMKburrIAapmU7rc+gPhiXULdCssLaWn5A4
1JRjyDuGGDojuMTy12kS1VpPOfBhoQvy7CoG3MdJvdr28k7NfTdjOA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1d3fhnsrjptnrvelew39xux2mes4d9zt8eyem3q5mpccav5g4fg6su9mx29
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtck5NK2ZwMXQxNk5XRnlo
ems3QzZnelAyWlRjS0tKV1Zhd3JJV3YyTDNNCmlFTDRJNFlPMHZ0UDc2RHcxQ2tk
VERFQndMN3pDRm9mSVlHUHRHcE1MbjgKLS0tICs5bzBIU1VlaHhKbk1idldPcXAz
clV4THVKc1REMmZpdWhxTnJWdzhHYzAK0PSmmiNbeErL6JARDaEr2RU44OOrTDgz
mTsIMrcVB9JVYH85YSUitApFKlYblLtktkHpMNZmTSHVuE0qMaOFBA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-08-25T15:59:22Z"
mac: ENC[AES256_GCM,data:gB/DWzjNVPYjxQOOpN3gAUDMkTku2k77YmaXScSy3e3HTDhcqeXqaJRlrqz7WObpGTFtC1p6MVSKZh6QU0g3q2sCoZSUzpY+ef9/248QuaaWYOAIk4/YfOkHvoWcnhxNCZVPzk8HdzEiaQKjRKiEgNH2Gcfj8A+MSNm9QZFcHYI=,iv:IcV3g10HZeOuhcj1ovesugj6VyhWqbOPL/mqCjrLr7w=,tag:cjayC5XMLOennnoFUyiU/A==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.9.0
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1dghfu7sxwlkf4626eywmgr63y2g7m4x8zs8a6xt2zay3x7dclpnsw776dd
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlazJvdmNCTWV2eWpWc0ll
WFdWK0l0b0pIMFVvTzd1THdacExTQzBRaVFzCmtlc2Zzcktrbk03UjRZaWZBRGFQ
QUszN0RQcE1TUWs5alhMdk1LZmxmalUKLS0tIHBISmZ5dTM5VkhBRG5wa0ZZbmVl
OEpTK0s0eW5vTlNaS05UcmhWRFBsMXMKburrIAapmU7rc+gPhiXULdCssLaWn5A4
1JRjyDuGGDojuMTy12kS1VpPOfBhoQvy7CoG3MdJvdr28k7NfTdjOA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1d3fhnsrjptnrvelew39xux2mes4d9zt8eyem3q5mpccav5g4fg6su9mx29
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtck5NK2ZwMXQxNk5XRnlo
ems3QzZnelAyWlRjS0tKV1Zhd3JJV3YyTDNNCmlFTDRJNFlPMHZ0UDc2RHcxQ2tk
VERFQndMN3pDRm9mSVlHUHRHcE1MbjgKLS0tICs5bzBIU1VlaHhKbk1idldPcXAz
clV4THVKc1REMmZpdWhxTnJWdzhHYzAK0PSmmiNbeErL6JARDaEr2RU44OOrTDgz
mTsIMrcVB9JVYH85YSUitApFKlYblLtktkHpMNZmTSHVuE0qMaOFBA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-08-30T14:55:49Z"
mac: ENC[AES256_GCM,data:Q8agV3tDMKg2TRk4xBs4w9tv3q+CGQf9Qw2GnK2J/m2qaJjQlcxF/8gYtCgb0pOPLTKI7dsijl6Q7WR63vc3GEzM5RrLkkDfeSxZETKZSpFexEDEM634IGSwKT2pZEK6Sg4Hs1H4omEQc8fsE4rHvOe56FwsBtngXcsFbXue/Ik=,iv:1YLT/NsEPU1CPbnWbU1Lgu8kxDtL7CVCxo3nPp6UZtg=,tag:L9YSJJm2B84QBTs7v0ieUw==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.9.0

0 comments on commit 6bc0bd6

Please sign in to comment.