Skip to content

Commit

Permalink
feat: install radarr
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed May 7, 2024
1 parent 5424aa0 commit 8715832
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
fail_fast: false

exclude: |
(?x)^(
| .*\.sops\.toml
)$
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: check-added-large-files
args: [--maxkb=2048]
- id: check-merge-conflict
- id: check-executables-have-shebangs

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: forbid-tabs

- repo: https://github.com/sirosen/fix-smartquotes
rev: 0.2.0
hooks:
- id: fix-smartquotes

- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
language: script
args: [--severity=error]
additional_dependencies: []

- repo: https://github.com/k8s-at-home/sops-pre-commit
rev: v2.1.1
hooks:
- id: forbid-secrets
29 changes: 29 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
ignore: |
.ansible/
.direnv/
.private/
.vscode/
*.sops.*
ansible/roles/xanmanning.k3s/
extends: default

rules:
truthy:
allowed-values: ["true", "false", "on"]

comments:
min-spaces-from-content: 1

line-length: disable

braces:
min-spaces-inside: 0
max-spaces-inside: 1

brackets:
min-spaces-inside: 0
max-spaces-inside: 0

indentation: enable
1 change: 1 addition & 0 deletions gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sops.* diff=sopsdiffer
1 change: 1 addition & 0 deletions kubernetes/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ resources:
- ./namespace.yaml
- ./jellyfin/ks.yaml
- ./prowlarr/ks.yaml
- ./radarr/ks.yaml
2 changes: 1 addition & 1 deletion kubernetes/apps/media/prowlarr/ks.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
# 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:
Expand Down
95 changes: 95 additions & 0 deletions kubernetes/apps/media/radarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
# 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: radarr
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.1.0
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
values:
controllers:
radarr:
annotations:
reloader.stakater.com/auto: "true"
pod:
securityContext:
runAsUser: 2000
runAsGroup: 2000
runAsNonRoot: true
fsGroup: 2000
fsGroupChangePolicy: "OnRootMismatch"
supplementalGroups:
- 65542
containers:
app:
image:
repository: ghcr.io/onedr0p/radarr-develop
tag: 5.5.2.8781@sha256:4b7de43df00613272532de7ecfc6a3207cb0a74fdcb2b05dd110ec2ebb493352
env:
COMPlus_EnableDiagnostics: "0"
RADARR__INSTANCE_NAME: Radarr
RADARR__PORT: &port 7878
RADARR__LOG_LEVEL: info
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
spec:
failureThreshold: 30
periodSeconds: 5
resources:
requests:
memory: 256Mi
limits:
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
service:
app:
controller: radarr
ports:
http:
port: *port
ingress:
app:
enabled: true
className: internal
hosts:
- host: &host radarr.${SECRET_DOMAIN}
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
movies:
enabled: true
type: nfs
server: ${NFS_SERVER}
path: /movies
globalMounts:
- path: /media/movies
7 changes: 7 additions & 0 deletions kubernetes/apps/media/radarr/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/radarr/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 radarr
namespace: flux-system
spec:
targetNamespace: media
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/media/radarr/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 15m

0 comments on commit 8715832

Please sign in to comment.