add plex-trakt-sync

This commit is contained in:
Joseph Hanson 2024-10-29 06:20:20 -05:00
parent 797e44f8bd
commit 389dfad2e2
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
4 changed files with 139 additions and 30 deletions

View file

@ -27,36 +27,34 @@ spec:
APP: *app
GATUS_PATH: /web/index.html
VOLSYNC_CAPACITY: 30Gi
# ---
# # yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
# apiVersion: kustomize.toolkit.fluxcd.io/v1
# kind: Kustomization
# metadata:
# name: &app plex-trakt-sync
# namespace: flux-system
# spec:
# targetNamespace: default
# commonMetadata:
# labels:
# app.kubernetes.io/name: *app
# interval: 30m
# timeout: 5m
# path: "./kubernetes/apps/default/plex/trakt-sync"
# prune: true
# sourceRef:
# kind: GitRepository
# name: theshire
# wait: true
# dependsOn:
# - name: rook-ceph-cluster
# - name: volsync
# - name: external-secrets-stores
# - name: plex
# postBuild:
# substitute:
# APP: *app
# APP_UID: "1000"
# APP_GID: "1000"
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app plex-trakt-sync
namespace: flux-system
spec:
targetNamespace: default
commonMetadata:
labels:
app.kubernetes.io/name: *app
interval: 30m
timeout: 5m
path: "./kubernetes/apps/default/plex/trakt-sync"
prune: true
sourceRef:
kind: GitRepository
name: theshire
wait: true
dependsOn:
- name: rook-ceph-cluster
- name: volsync
- name: external-secrets-stores
- name: plex
postBuild:
substitute:
APP: *app
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1

View file

@ -0,0 +1,70 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app plex-trakt-sync
spec:
chart:
spec:
chart: app-template
version: 3.5.1
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
interval: 30m
values:
controllers:
plex-trakt-sync:
type: cronjob
annotations:
reloader.stakater.com/auto: "true"
cronjob:
schedule: "@daily"
pod:
securityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
fsGroupChangePolicy: "OnRootMismatch"
containers:
app:
image:
repository: ghcr.io/taxel/plextraktsync
tag: 0.32.0
args:
- sync
env:
PLEX_BASEURL: http://plex.default.svc.cluster.local:32400
PLEX_LOCALURL: http://plex.default.svc.cluster.local:32400
PLEX_USERNAME: jahanson
TRAKT_USERNAME: jahanson
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
resources:
requests:
cpu: 5m
memory: 128M
persistence:
config:
enabled: true
existingClaim: *app
advancedMounts:
plex-trakt-sync:
app:
- path: /app/config
config-yaml:
type: configMap
name: plex-trakt-sync-configmap
globalMounts:
- path: /app/config/config.yml
subPath: config.yml
readOnly: true

View file

@ -0,0 +1,15 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ../../../../templates/volsync
configMapGenerator:
- name: plex-trakt-sync-configmap
files:
- ./resources/config.yml
generatorOptions:
disableNameSuffixHash: true
annotations:
kustomize.toolkit.fluxcd.io/substitute: disabled

View file

@ -0,0 +1,26 @@
---
cache:
path: $PTS_CACHE_DIR/trakt_cache
config:
dotenv_override: true
logging:
append: false
debug: false
filename: plextraktsync.log
sync:
plex_to_trakt:
collection: true
ratings: true
watched_status: true
trakt_to_plex:
liked_lists: true
ratings: true
watched_status: true
watchlist: true
xbmc-providers:
movies: imdb
shows: tvdb