fix(autobrr) mount config.toml for autobrr (#17740)

**Description**
fixes issues with ingress due to the host needing to be set to 0.0.0.0
and additional configs options set.
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [X] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [X] ⬆️ I increased versions for any altered app according to semantic
versioning

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Xstar97TheNoob
2024-02-01 17:25:23 +01:00
committed by GitHub
parent 6da87d2829
commit 570a777c81
5 changed files with 140 additions and 22 deletions
+1 -1
View File
@@ -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
+25
View File
@@ -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
@@ -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 -}}
+11 -1
View File
@@ -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" . -}}
+19 -20
View File
@@ -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