From 9d5f95fc0a91a2b5c8787211d7db69b90eb4d697 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Tue, 28 Feb 2023 03:09:32 -0500 Subject: [PATCH] BREAKING CHANGE feat(readarr) add postgres support and auth in in gui (#6392) * add postgres support + auth in gui * fix postgres * Delete _secret.tpl * Update charts/stable/readarr/templates/common.yaml Co-authored-by: Kjeld Schouten-Lebbing Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> * update chart and values * add empty string --------- Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing --- charts/stable/readarr/Chart.yaml | 7 ++- charts/stable/readarr/questions.yaml | 58 ++++++++++++++------- charts/stable/readarr/templates/common.yaml | 7 ++- charts/stable/readarr/values.yaml | 26 +++++++-- 4 files changed, 74 insertions(+), 24 deletions(-) diff --git a/charts/stable/readarr/Chart.yaml b/charts/stable/readarr/Chart.yaml index 32bd6af04da..605efd03831 100644 --- a/charts/stable/readarr/Chart.yaml +++ b/charts/stable/readarr/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: A fork of Radarr to work with Books & AudioBooks home: https://truecharts.org/charts/stable/readarr @@ -22,11 +26,10 @@ maintainers: name: readarr sources: - https://github.com/truecharts/charts/tree/master/charts/stable/readarr - - https://ghcr.io/onedr0p/readarr-develop - https://github.com/Readarr/Readarr - https://readarr.com type: application -version: 13.0.15 +version: 14.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/readarr/questions.yaml b/charts/stable/readarr/questions.yaml index 85fe4a4a021..baa9391310d 100644 --- a/charts/stable/readarr/questions.yaml +++ b/charts/stable/readarr/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: READARR__AUTHENTICATION_METHOD + label: Auth Method + description: Sets the auth method. + schema: + type: string + default: "" + enum: + - value: "" + description: In-App Setting + - value: External + description: External + - 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: 8787 @@ -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: false - 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/readarr/templates/common.yaml b/charts/stable/readarr/templates/common.yaml index c1a366e1cf0..90075b16b37 100644 --- a/charts/stable/readarr/templates/common.yaml +++ b/charts/stable/readarr/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/readarr/values.yaml b/charts/stable/readarr/values.yaml index d258c81d695..7f7a8f2cdaf 100644 --- a/charts/stable/readarr/values.yaml +++ b/charts/stable/readarr/values.yaml @@ -1,17 +1,31 @@ image: repository: tccr.io/truecharts/readarr pullPolicy: IfNotPresent - tag: 0.1.4.1596@sha256:31ec42eddeff7af9919ef5312289c74eace114b7fa532cf6040afaf54e3b5c98 + tag: v0.1.4.1596@sha256:8228fb87ef5626392c481849a7f8d089e7ae16afc148da54e7ef0a1bd4669483 securityContext: readOnlyRootFilesystem: false +env: + READARR__PORT: "{{ .Values.service.main.ports.main.port }}" + READARR__AUTHENTICATION_METHOD: "" + READARR__POSTGRES_PORT: 5432 + READARR__POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}" + READARR__POSTGRES_MAIN_DB: "{{ .Values.postgresql.postgresqlDatabase }}" + READARR__POSTGRES_HOST: + secretKeyRef: + name: dbcreds + key: plainhost + READARR__POSTGRES_PASSWORD: + secretKeyRef: + name: dbcreds + key: postgresql-password + service: main: ports: main: port: 8787 - targetPort: 8787 probes: liveness: @@ -37,7 +51,13 @@ probes: persistence: config: enabled: true - mountPath: "/config" + mountPath: /config + +postgresql: + enabled: true + existingSecret: dbcreds + postgresqlDatabase: readarr + postgresqlUsername: readarr portal: enabled: true