Skip to content

Commit

Permalink
feat: install sonarr
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed May 9, 2024
1 parent 579c2a3 commit a1ec479
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 2 deletions.
7 changes: 7 additions & 0 deletions kubernetes/apps/media/jellyfin/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ spec:
path: /movies
globalMounts:
- path: /media/movies
series:
enabled: true
type: nfs
server: ${NFS_SERVER}
path: /series
globalMounts:
- path: /media/series
transcode:
enabled: true
type: emptyDir
Expand Down
1 change: 1 addition & 0 deletions kubernetes/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ resources:
- ./prowlarr/ks.yaml
- ./qbittorrent/ks.yaml
- ./radarr/ks.yaml
- ./sonarr/ks.yaml
11 changes: 9 additions & 2 deletions kubernetes/apps/media/qbittorrent/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ spec:
tag: v3.38.0
env:
DOT: "off"
DNS_ADDRESS: 4.4.4.4
DNS_ADDRESS: 208.67.222.222
FIREWALL_INPUT_PORTS: 8080
FIREWALL_OUTBOUND_SUBNETS: 10.96.0.0/16 # Allow access to k8s subnets
FIREWALL_OUTBOUND_SUBNETS: 10.96.0.0/16,10.69.0.0/16 # Allow access to k8s subnets
SERVER_CATEGORIES: P2P
SERVER_COUNTRIES: Sweden
VPN_SERVICE_PROVIDER: nordvpn
Expand Down Expand Up @@ -123,3 +123,10 @@ spec:
qbittorrent:
app:
- path: /media/movies
series:
enabled: true
type: nfs
server: ${NFS_SERVER}
path: /series
globalMounts:
- path: /media/series
109 changes: 109 additions & 0 deletions kubernetes/apps/media/sonarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app sonarr
namespace: &namespace media
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.1.0
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controllers:
sonarr:
annotations:
reloader.stakater.com/auto: "true"
pod:
securityContext:
runAsUser: 2000
runAsGroup: 2000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: "OnRootMismatch"
containers:
app:
image:
repository: ghcr.io/onedr0p/sonarr-develop
tag: 4.0.4.1650@sha256:48625a08997acd9934595b281944152c222b93eca538eadebd2f9af19db73464
env:
COMPlus_EnableDiagnostics: "0"
SONARR__APP__INSTANCENAME: Sonarr
SONARR__LOG__LEVEL: info
SONARR__SERVER__PORT: &port 8989
SONARR__UPDATE__BRANCH: develop
TZ: ${TIMEZONE}
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
spec:
failureThreshold: 30
periodSeconds: 5
resources:
requests:
memory: 512Mi
limits:
memory: 768Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
service:
app:
controller: sonarr
ports:
http:
port: *port

ingress:
app:
className: internal
hosts:
- host: &host sonarr.${SECRET_DOMAIN}
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
series:
enabled: true
type: nfs
server: ${NFS_SERVER}
path: /series
globalMounts:
- path: /media/series
defaultPodOptions:
dnsConfig:
options:
- name: ndots
value: "1"
7 changes: 7 additions & 0 deletions kubernetes/apps/media/sonarr/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: media
resources:
- ./helmrelease.yaml
21 changes: 21 additions & 0 deletions kubernetes/apps/media/sonarr/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app sonarr
namespace: flux-system
spec:
targetNamespace: media
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/media/sonarr/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 15m

0 comments on commit a1ec479

Please sign in to comment.