diff --git a/charts/stable/autobrr/Chart.yaml b/charts/stable/autobrr/Chart.yaml index 892bc101a62..f4c5aa83a67 100644 --- a/charts/stable/autobrr/Chart.yaml +++ b/charts/stable/autobrr/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/autobrr - https://ghcr.io/autobrr/autobrr type: application -version: 7.3.0 +version: 7.3.1 diff --git a/charts/stable/autobrr/questions.yaml b/charts/stable/autobrr/questions.yaml index 3ffb1c88230..c9ffdfa3e54 100644 --- a/charts/stable/autobrr/questions.yaml +++ b/charts/stable/autobrr/questions.yaml @@ -12,6 +12,31 @@ questions: # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} + + - variable: autobrr + group: App Configuration + label: Autobrr Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: log_level + label: Log Level + schema: + type: string + default: "DEBUG" + enum: + - value: "ERROR" + description: "Error" + - value: "DEBUG" + description: "Debug" + - value: "INFO" + description: "Info" + - value: "WARN" + description: "Warn" + - value: "TRACE" + description: "Trace" + # Include{podOptions} # Include{serviceRoot} - variable: main diff --git a/charts/stable/autobrr/templates/_configmap.tpl b/charts/stable/autobrr/templates/_configmap.tpl new file mode 100644 index 00000000000..6516653db43 --- /dev/null +++ b/charts/stable/autobrr/templates/_configmap.tpl @@ -0,0 +1,84 @@ +{{/* Define the configmap */}} +{{- define "autobrr.configmaps" -}} +{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}} +{{- $secretName := printf "%s-autobrr-secret" (include "tc.v1.common.lib.chart.names.fullname" .) }} + +{{- $mainPort := .Values.service.main.ports.main.port -}} +{{- $logLevel := .Values.autobrr.log_level -}} + +{{- $sessionSecret := randAlphaNum 32 -}} + + {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} + {{- $sessionSecret = index .data "sessionSecret" | b64dec -}} + {{- end }} + +autobrr-config: + enabled: true + data: + config.toml: | + # config.toml + # Hostname / IP + # + # Default: "localhost" + # + host = "0.0.0.0" + + # Port + # + # Default: 7474 + # + port = {{ $mainPort }} + + # Base url + # Set custom baseUrl eg /autobrr/ to serve in subdirectory. + # Not needed for subdomain, or by accessing with the :port directly. + # + # Optional + # + baseUrl = "/" + + # autobrr logs file + # If not defined, logs to stdout + # + # Optional + # + #logPath = "log/autobrr.log" + + # Log level + # + # Default: "DEBUG" + # + # Options: "ERROR", "DEBUG", "INFO", "WARN", "TRACE" + # + logLevel = "{{ $logLevel }}" + + # Log Max Size + # + # Default: 50 + # + # Max log size in megabytes + # + #logMaxSize = 50 + + # Log Max Backups + # + # Default: 3 + # + # Max amount of old log files + # + #logMaxBackups = 3 + + # Check for updates + # + # Default: true + # + checkForUpdates = true + + # Session secret + # + sessionSecret = "{{ $sessionSecret }}" + + # Custom definitions + # + #customDefinitions = "test/definitions" +{{- end -}} diff --git a/charts/stable/autobrr/templates/common.yaml b/charts/stable/autobrr/templates/common.yaml index b51394e00a4..177ccd838e1 100644 --- a/charts/stable/autobrr/templates/common.yaml +++ b/charts/stable/autobrr/templates/common.yaml @@ -1 +1,11 @@ -{{ include "tc.v1.common.loader.all" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . -}} + +{{/* Render configmaps for all pods */}} +{{- $configmaps := include "autobrr.configmaps" . | fromYaml -}} +{{- if $configmaps -}} + {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} +{{- end -}} + +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/stable/autobrr/values.yaml b/charts/stable/autobrr/values.yaml index 3cdf43e4bb4..8fbfcc8b63c 100644 --- a/charts/stable/autobrr/values.yaml +++ b/charts/stable/autobrr/values.yaml @@ -2,13 +2,18 @@ image: repository: ghcr.io/autobrr/autobrr pullPolicy: IfNotPresent tag: v1.36.0@sha256:14eaf6809f431cd38afdfa3e498e01e88b9a86a54ea9ecb8ae608d48d5aa81f0 + service: main: ports: main: - port: 7474 protocol: http - targetPort: 7474 + port: 7474 + +autobrr: + # ERROR | DEBUG |INFO | WARN | TRACE + log_level: DEBUG + workload: main: podSpec: @@ -16,30 +21,24 @@ workload: main: probes: liveness: - enabled: true - type: exec - command: - - /bin/sh - - -c - - curl --fail localhost:7474/ + type: http readiness: - enabled: true - type: exec - command: - - /bin/sh - - -c - - curl --fail localhost:7474/ + type: http startup: - enabled: true - type: exec - command: - - /bin/sh - - -c - - curl --fail localhost:7474/ + type: tcp + persistence: config: enabled: true mountPath: /config + autobrr-config: + enabled: true + type: configmap + objectName: autobrr-config + mountPath: /config/config.toml + subPath: config.toml + readOnly: true + portal: open: enabled: true