Skip to content

Commit

Permalink
feat(download): add sonarr
Browse files Browse the repository at this point in the history
  • Loading branch information
ctso committed Dec 31, 2023
1 parent c7f540e commit 05477e6
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/apps/download/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./sonarr/ks.yaml
82 changes: 82 additions & 0 deletions kubernetes/apps/download/sonarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: sonarr
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 2.4.0
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system

values:
controllers:
main:
annotations:
reloader.stakater.com/auto: "true"

pod:
securityContext:
runAsUser: 568
runAsGroup: 568
runAsNonRoot: true
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch

containers:
main:
image:
repository: ghcr.io/onedr0p/sonarr-develop
tag: 4.0.0.746@sha256:9bd35258643a6d008fc80f85060d5fd67f60d0ab455f11ed5597e5af6ea0c3a3
env:
SONARR__INSTANCE_NAME: Sonarr
SONARR__PORT: &port 8989
SONARR__AUTHENTICATION_METHOD: External
SONARR__AUTHENTICATION_REQUIRED: DisabledForLocalAddresses
SONARR__APPLICATION_URL: "https://sonarr.${SECRET_DOMAIN}"
SONARR__LOG_LEVEL: info
resources:
requests:
cpu: 20m
memory: 512M
limits:
memory: 768M

service:
main:
ports:
http:
port: *port

ingress:
main:
enabled: true
className: internal
hosts:
- host: &host "sonarr.${SECRET_DOMAIN}"
paths:
- path: /
service:
name: main
port: http
tls:
- hosts:
- *host

persistence:
config:
enabled: true
existingClaim: sonarr
media:
type: nfs
server: 10.19.1.16
path: /volume1/media
globalMounts:
- path: /data/media
6 changes: 6 additions & 0 deletions kubernetes/apps/download/sonarr/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ../../../../templates/volsync
25 changes: 25 additions & 0 deletions kubernetes/apps/download/sonarr/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app sonarr
namespace: flux-system
spec:
targetNamespace: download
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/download/sonarr/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app
VOLSYNC_CAPACITY: 5Gi

0 comments on commit 05477e6

Please sign in to comment.