From 2e360d991ba0181ff53fc1e629f2d92204447261 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Tue, 28 Feb 2023 03:09:45 -0500 Subject: [PATCH] BREAKING CHANGE fix(sonarr) postgres support add gui option to select auth (#6347) * fix(sonarr) add gui option to select auth * set default auth to Forms * add auth and postgres support(not enabled) * Update charts/stable/sonarr/Chart.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * check if enabled * Update charts/stable/sonarr/questions.yaml Signed-off-by: Kjeld Schouten-Lebbing * Delete _secrets.tpl * Update charts/stable/sonarr/templates/common.yaml Signed-off-by: Kjeld Schouten-Lebbing * update values * comment out postgres until v4 --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Kjeld Schouten-Lebbing Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Xstar97 Co-authored-by: Kjeld Schouten-Lebbing --- charts/stable/sonarr/Chart.yaml | 7 ++- charts/stable/sonarr/questions.yaml | 58 +++++++++++++++------- charts/stable/sonarr/templates/common.yaml | 7 ++- charts/stable/sonarr/values.yaml | 26 +++++++++- 4 files changed, 75 insertions(+), 23 deletions(-) diff --git a/charts/stable/sonarr/Chart.yaml b/charts/stable/sonarr/Chart.yaml index 5c693178b50..af3258923fa 100644 --- a/charts/stable/sonarr/Chart.yaml +++ b/charts/stable/sonarr/Chart.yaml @@ -4,6 +4,10 @@ dependencies: - name: common repository: https://library-charts.truecharts.org version: 11.1.2 + - condition: postgresql.enabled + name: postgresql + repository: https://charts.truecharts.org/ + version: 11.0.18 deprecated: false description: Smart PVR for newsgroup and bittorrent users home: https://truecharts.org/charts/stable/sonarr @@ -20,10 +24,9 @@ maintainers: name: sonarr sources: - https://github.com/truecharts/charts/tree/master/charts/stable/sonarr - - https://ghcr.io/onedr0p/sonarr - https://github.com/Sonarr/Sonarr type: application -version: 13.0.8 +version: 14.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/sonarr/questions.yaml b/charts/stable/sonarr/questions.yaml index e9dd90c1ea2..7efeeeb7e7c 100644 --- a/charts/stable/sonarr/questions.yaml +++ b/charts/stable/sonarr/questions.yaml @@ -8,11 +8,33 @@ questions: # Include{replicas} # Include{replica1} # Include{controllerExpertExtraArgs} + - variable: env + group: App Configuration + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: SONARR__AUTHENTICATION_METHOD + label: Auth Method + description: Sets the auth method. + schema: + type: string + default: "" + enum: + - value: "" + description: In-App Setting + - value: External + description: External/None + - value: Basic + description: Basic + - value: Forms + description: Forms # Include{containerConfig} # Include{serviceRoot} - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" + label: Main Service + description: The Primary service on which the healthcheck runs, often the webUI schema: additional_attrs: true type: dict @@ -20,14 +42,14 @@ questions: # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main - label: "Main Service Port Configuration" + label: Main Service Port Configuration schema: additional_attrs: true type: dict attrs: - variable: port - label: "Port" - description: "This port exposes the container port on the service" + label: Port + description: This port exposes the container port on the service schema: type: int default: 8989 @@ -38,8 +60,8 @@ questions: # Include{serviceList} # Include{persistenceRoot} - variable: config - label: "App Config Storage" - description: "Stores the Application Configuration." + label: App Config Storage + description: Stores the Application Configuration. schema: additional_attrs: true type: dict @@ -48,7 +70,7 @@ questions: # Include{persistenceList} # Include{ingressRoot} - variable: main - label: "Main Ingress" + label: Main Ingress schema: additional_attrs: true type: dict @@ -60,41 +82,41 @@ questions: # Include{security} # Include{securityContextAdvancedRoot} - variable: privileged - label: "Privileged mode" + label: Privileged mode schema: type: boolean default: false - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" + label: ReadOnly Root Filesystem schema: type: boolean default: true - variable: allowPrivilegeEscalation - label: "Allow Privilege Escalation" + label: Allow Privilege Escalation schema: type: boolean default: false - variable: runAsNonRoot - label: "runAsNonRoot" + label: runAsNonRoot schema: type: boolean default: true # Include{podSecurityContextRoot} - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" + label: runAsUser + description: The UserID of the user running the application schema: type: int default: 568 - variable: runAsGroup - label: "runAsGroup" - description: "The groupID this App of the user running the application" + label: runAsGroup + description: The groupID this App of the user running the application schema: type: int default: 568 - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." + label: fsGroup + description: The group that should own ALL storage. schema: type: int default: 568 diff --git a/charts/stable/sonarr/templates/common.yaml b/charts/stable/sonarr/templates/common.yaml index c1a366e1cf0..90075b16b37 100644 --- a/charts/stable/sonarr/templates/common.yaml +++ b/charts/stable/sonarr/templates/common.yaml @@ -1 +1,6 @@ -{{ include "tc.common.loader.all" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.common.loader.init" . }} + + +{{/* Render the templates */}} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/stable/sonarr/values.yaml b/charts/stable/sonarr/values.yaml index 596a729dc6f..996ad925c4e 100644 --- a/charts/stable/sonarr/values.yaml +++ b/charts/stable/sonarr/values.yaml @@ -3,12 +3,27 @@ image: pullPolicy: IfNotPresent tag: 3.0.9.1549@sha256:294b6288d91346f6e65f8cb344b42d17c97b3ee7ada501d77307088f79a8dc15 +env: + SONARR__PORT: "{{ .Values.service.main.ports.main.port }}" + SONARR__AUTHENTICATION_METHOD: "" + # Enable postgres if v4 of sonarr supports it. + # SONARR__POSTGRES_PORT: 5432 + # SONARR__POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}" + # SONARR__POSTGRES_MAIN_DB: "{{ .Values.postgresql.postgresqlDatabase }}" + # SONARR__POSTGRES_HOST: + # secretKeyRef: + # name: dbcreds + # key: plainhost + # SONARR__POSTGRES_PASSWORD: + # secretKeyRef: + # name: dbcreds + # key: postgresql-password + service: main: ports: main: port: 8989 - targetPort: 8989 probes: liveness: @@ -34,7 +49,14 @@ probes: persistence: config: enabled: true - mountPath: "/config" + mountPath: /config + +# might be supported on sonarr v4 upon released +postgresql: + enabled: false + existingSecret: dbcreds + postgresqlDatabase: sonarr + postgresqlUsername: sonarr portal: enabled: true