This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #901 from Truxnell/Truxnell/issue258
Add trash-updator - #258
- Loading branch information
Showing
5 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: trash-updater | ||
namespace: organizarrs | ||
labels: | ||
app: trash-updater | ||
spec: | ||
schedule: "0 3 * * *" | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
automountServiceAccountToken: false | ||
|
||
initContainers: | ||
- name: render-config | ||
image: ghcr.io/k8s-at-home/trash-updater:v1.8.2 | ||
env: | ||
- name: RADARR_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: trash-updater-secrets | ||
key: radarrApiKey | ||
- name: SONARR_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: trash-updater-secrets | ||
key: sonarrApiKey | ||
command: | ||
- "/bin/bash" | ||
- -c | ||
args: | ||
- "envsubst < /config/trash.yaml > /shared/trash.yaml" | ||
volumeMounts: | ||
- name: config | ||
mountPath: /config | ||
- name: shared | ||
mountPath: /shared | ||
|
||
containers: | ||
- name: trash-updater-sonarr | ||
image: ghcr.io/k8s-at-home/trash-updater:v1.8.2 | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: TZ | ||
value: "${TIMEZONE}" | ||
command: | ||
- /app/trash | ||
args: | ||
- sonarr | ||
- --config | ||
- /config/trash.yaml | ||
volumeMounts: | ||
- name: shared | ||
mountPath: /config | ||
readOnly: true | ||
|
||
- name: trash-updater-radarr | ||
image: ghcr.io/k8s-at-home/trash-updater:v1.8.2 | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: TZ | ||
value: "${TIMEZONE}" | ||
command: | ||
- /app/trash | ||
args: | ||
- radarr | ||
- --config | ||
- /config/trash.yaml | ||
volumeMounts: | ||
- name: shared | ||
mountPath: /config | ||
readOnly: true | ||
|
||
restartPolicy: OnFailure | ||
|
||
volumes: | ||
- name: config | ||
configMap: | ||
name: trash-updater-config | ||
- name: shared | ||
emptyDir: {} |
15 changes: 15 additions & 0 deletions
15
k8s/manifests/organizarrs/trash-updater/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: downloads | ||
resources: | ||
- secret.sops.yaml | ||
- cronjob.yaml | ||
configMapGenerator: | ||
- name: trash-updater-config | ||
files: | ||
- trash.yaml | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
annotations: | ||
kustomize.toolkit.fluxcd.io/substitute: disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
name: trash-updater-secrets | ||
namespace: organizarrs | ||
stringData: | ||
radarrApiKey: 81b871ddf3d24beb9d832eec2f951727 | ||
sonarrApiKey: 55a99987569d40448bd9e1f47614b4c1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# For more details on the configuration, see the Configuration Reference on the wiki here: | ||
# https://github.com/rcdailey/trash-updater/wiki/Configuration-Reference | ||
|
||
# Configuration specific to Sonarr | ||
sonarr: | ||
- base_url: http://sonarr.organizarrs:8989 | ||
api_key: ${SONARR_API_KEY} | ||
|
||
quality_definition: series | ||
|
||
release_profiles: | ||
- type: series | ||
|
||
# Configuration specific to Radarr. | ||
radarr: | ||
- base_url: http://radarr.organizarrs:7878 | ||
api_key: ${RADARR_API_KEY} | ||
|
||
quality_definition: | ||
type: movie | ||
|
||
delete_old_custom_formats: true | ||
|
||
custom_formats: | ||
- names: | ||
- 3D | ||
- 5.1 Surround | ||
- BR-DISK | ||
- DV | ||
- EVO (no WEBDL) | ||
- HDR | ||
- HDR (undefined) | ||
- HQ-Remux | ||
- HQ-WEBDL | ||
- LQ | ||
- No-RlsGroup | ||
- Repack/Proper | ||
- Special Edition | ||
- Theatrical Cut | ||
- x265 (720/1080p) | ||
quality_profiles: | ||
- name: HD-1080p | ||
|
||
- names: | ||
- Multi | ||
quality_profiles: | ||
- name: HD-1080p | ||
score: -10000 | ||
- name: Ultra-HD | ||
score: -10000 |