1 parent
5213be53dd
commit
48f9384155
4 files changed
+212
No files matched your search
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: &name sonarr
|
||||||
|
spec:
|
||||||
|
target:
|
||||||
|
name: *name
|
||||||
|
deletionPolicy: Delete
|
||||||
|
template:
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
# App
|
||||||
|
SONARR__AUTH__APIKEY: "{{ .SONARR_API_KEY }}"
|
||||||
|
SONARR__POSTGRES__HOST: &dbHost postgres-rw.databases.svc.cluster.local
|
||||||
|
SONARR__POSTGRES__PORT: "5432"
|
||||||
|
SONARR__POSTGRES__USER: &dbUser "{{ .SONARR_POSTGRES_USER }}"
|
||||||
|
SONARR__POSTGRES__PASSWORD: &dbPass "{{ .SONARR_POSTGRES_PASSWORD }}"
|
||||||
|
SONARR__POSTGRES__MAINDB: &dbName sonarr_main
|
||||||
|
# Postgres Init
|
||||||
|
INIT_POSTGRES_DBNAME: *dbName
|
||||||
|
INIT_POSTGRES_HOST: *dbHost
|
||||||
|
INIT_POSTGRES_USER: *dbUser
|
||||||
|
INIT_POSTGRES_PASS: *dbPass
|
||||||
|
INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_ADMIN_PASS }}"
|
||||||
|
data:
|
||||||
|
- secretKey: SONARR_API_KEY
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: &secretApiKey cccf2793-8f91-47da-be0d-63f08cdeda95
|
||||||
|
property: password
|
||||||
|
- secretKey: SONARR_POSTGRES_USER
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: &secretDatabaseKey 6fbd4e66-0750-4dea-94b6-b5eb25c77c44
|
||||||
|
property: username
|
||||||
|
- secretKey: SONARR_POSTGRES_PASSWORD
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: *secretDatabaseKey
|
||||||
|
property: password
|
||||||
|
- secretKey: POSTGRES_ADMIN_USER
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: &secretAdminDatabaseKey 88217883-df53-4c96-aad7-f3b2142382de
|
||||||
|
property: username
|
||||||
|
- secretKey: POSTGRES_ADMIN_PASS
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: *secretAdminDatabaseKey
|
||||||
|
property: password
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: &app sonarr
|
||||||
|
spec:
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: app-template
|
||||||
|
version: 3.5.1
|
||||||
|
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"
|
||||||
|
initContainers:
|
||||||
|
init-db:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/onedr0p/postgres-init
|
||||||
|
tag: 16.4@sha256:e41c745b54485341e00efbd27556f0717623a119f0d5107e5ff831aa1322c76f
|
||||||
|
envFrom: &envFrom
|
||||||
|
- secretRef:
|
||||||
|
name: *app
|
||||||
|
containers:
|
||||||
|
app:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/onedr0p/sonarr-develop
|
||||||
|
tag: rolling@sha256:550d8206663585710556de32e8656b4838e83c9dd79ec271af567b85fa724912
|
||||||
|
env:
|
||||||
|
TZ: "${TIMEZONE}"
|
||||||
|
SONARR__APP__INSTANCENAME: Sonarr
|
||||||
|
SONARR__APP__THEME: dark
|
||||||
|
SONARR__AUTH__METHOD: External
|
||||||
|
SONARR__AUTH__REQUIRED: DisabledForLocalAddresses
|
||||||
|
SONARR__LOG__DBENABLED: "False"
|
||||||
|
SONARR__LOG__LEVEL: info
|
||||||
|
SONARR__SERVER__PORT: &port 80
|
||||||
|
SONARR__UPDATE__BRANCH: develop
|
||||||
|
envFrom: *envFrom
|
||||||
|
probes:
|
||||||
|
liveness: &probes
|
||||||
|
enabled: true
|
||||||
|
custom: true
|
||||||
|
spec:
|
||||||
|
httpGet:
|
||||||
|
path: /ping
|
||||||
|
port: *port
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 5
|
||||||
|
readiness: *probes
|
||||||
|
startup:
|
||||||
|
enabled: false
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
capabilities: { drop: ["ALL"] }
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
memory: 4Gi
|
||||||
|
defaultPodOptions:
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 568
|
||||||
|
runAsGroup: 568
|
||||||
|
fsGroup: 568
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
seccompProfile: { type: RuntimeDefault }
|
||||||
|
service:
|
||||||
|
app:
|
||||||
|
controller: *app
|
||||||
|
ports:
|
||||||
|
http:
|
||||||
|
port: *port
|
||||||
|
ingress:
|
||||||
|
app:
|
||||||
|
className: internal
|
||||||
|
# annotations:
|
||||||
|
# external-dns.alpha.kubernetes.io/target: internal.${SECRET_DOMAIN}
|
||||||
|
# gethomepage.dev/enabled: "true"
|
||||||
|
# gethomepage.dev/group: Downloads
|
||||||
|
# gethomepage.dev/name: Sonarr
|
||||||
|
# gethomepage.dev/icon: sonarr.png
|
||||||
|
# gethomepage.dev/description: TV Downloads
|
||||||
|
# gethomepage.dev/widget.type: sonarr
|
||||||
|
# gethomepage.dev/widget.url: http://sonarr.downloads
|
||||||
|
# gethomepage.dev/widget.key: "{{ `{{HOMEPAGE_VAR_SONARR_TOKEN}}` }}"
|
||||||
|
# nginx.ingress.kubernetes.io/configuration-snippet: ${THEME_PARK_SNIPPET}
|
||||||
|
hosts:
|
||||||
|
- host: "{{ .Release.Name }}.${SECRET_INTERNAL_DOMAIN}"
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
service:
|
||||||
|
identifier: app
|
||||||
|
port: http
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
enabled: true
|
||||||
|
type: nfs
|
||||||
|
server: 192.168.1.68
|
||||||
|
path: /mnt/user/k3s/config/sonarr
|
||||||
|
tmp:
|
||||||
|
type: emptyDir
|
||||||
|
media:
|
||||||
|
existingClaim: cifs-tv
|
||||||
|
globalMounts:
|
||||||
|
- path: /media/tv
|
||||||
|
downloads:
|
||||||
|
existingClaim: cifs-downloads
|
||||||
|
advancedMounts:
|
||||||
|
sonarr:
|
||||||
|
app:
|
||||||
|
- path: /downloads/downloaded_tv
|
||||||
|
readOnly: false
|
||||||
|
subPath: sabnzbd/downloaded_tv
|
||||||
|
- path: /downloads/tv-sonarr
|
||||||
|
readOnly: false
|
||||||
|
subPath: flood/tv-sonarr
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
# - ../../../../templates/volsync
|
||||||
|
- ./externalsecret.yaml
|
||||||
|
- ./helmrelease.yaml
|
||||||
|
# - ../../../../templates/gatus/guarded
|
||||||
Whitespace-only changes.
Reference in new issue
Block a user