diff --git a/charts/stable/romm/Chart.yaml b/charts/stable/romm/Chart.yaml index 49e22046b45..2f466328960 100644 --- a/charts/stable/romm/Chart.yaml +++ b/charts/stable/romm/Chart.yaml @@ -8,6 +8,10 @@ dependencies: name: mariadb repository: https://deps.truecharts.org/ version: 7.0.70 + - condition: redis.enabled + name: redis + repository: https://deps.truecharts.org + version: 7.0.6 deprecated: false description: game library manager focused in retro gaming home: https://truecharts.org/charts/stable/romm @@ -25,7 +29,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/romm - https://github.com/zurdi15/romm type: application -version: 2.0.2 +version: 2.0.3 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/romm/questions.yaml b/charts/stable/romm/questions.yaml index a121d7bb98b..52245b8d940 100644 --- a/charts/stable/romm/questions.yaml +++ b/charts/stable/romm/questions.yaml @@ -42,6 +42,31 @@ questions: # Include{containerBasic} # Include{containerAdvanced} + - variable: romm + group: App Configuration + label: Romm + schema: + additional_attrs: true + type: dict + attrs: + - variable: auth + label: Auth Credentials + schema: + additional_attrs: true + type: dict + attrs: + - variable: user + label: Auth User + schema: + type: string + default: "" + - variable: pass + label: Auth Password + schema: + type: string + private: true + default: "" + # Include{containerConfig} # Include{serviceRoot} # Include{serviceMain} @@ -79,6 +104,14 @@ questions: additional_attrs: true type: dict attrs: +# Include{persistenceBasic} + - variable: logs + label: App Logs Storage + description: Stores the Application Logs. + schema: + additional_attrs: true + type: dict + attrs: # Include{persistenceBasic} # Include{persistenceList} # Include{ingressRoot} diff --git a/charts/stable/romm/templates/_secrets.tpl b/charts/stable/romm/templates/_secrets.tpl new file mode 100644 index 00000000000..efcd7715118 --- /dev/null +++ b/charts/stable/romm/templates/_secrets.tpl @@ -0,0 +1,13 @@ +{{/* Define the secrets */}} +{{- define "romm.secrets" -}} +{{- $secretName := (printf "%s-romm-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} + +{{- $authKey := randAlphaNum 64 -}} + + {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} + {{- $authKey = index .data "ROMM_AUTH_SECRET_KEY" | b64dec -}} + {{- end }} +enabled: true +data: + ROMM_AUTH_SECRET_KEY: {{ $authKey }} +{{- end -}} diff --git a/charts/stable/romm/templates/common.yaml b/charts/stable/romm/templates/common.yaml index b51394e00a4..39d94da9407 100644 --- a/charts/stable/romm/templates/common.yaml +++ b/charts/stable/romm/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 secrets for romm */}} +{{- $secrets := include "romm.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "romm-secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/stable/romm/values.yaml b/charts/stable/romm/values.yaml index 69bc03a23be..9a93ab02a10 100644 --- a/charts/stable/romm/values.yaml +++ b/charts/stable/romm/values.yaml @@ -10,6 +10,18 @@ securityContext: runAsUser: 0 runAsGroup: 0 +service: + main: + ports: + main: + protocol: http + port: 10680 + +romm: + auth: + user: "admin" + pass: "admin" + workload: main: podSpec: @@ -23,12 +35,13 @@ workload: startup: type: http env: + VITE_BACKEND_DEV_PORT: "{{ .Values.service.main.ports.main.port }}" + ROMM_BASE_PATH: /romm ROMM_DB_DRIVER: mariadb # IGDB client id CLIENT_ID: "" # IGDB client secret CLIENT_SECRET: "" - # WIP STEAMGRIDDB_API_KEY: "" DB_PORT: 3306 DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}" @@ -43,14 +56,20 @@ workload: expandObjectName: false name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}' key: mariadb-password - -service: - main: - ports: - main: - protocol: http - targetPort: 80 - port: 10680 + REDIS_HOST: + secretKeyRef: + expandObjectName: false + name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}' + key: plainhost + REDIS_PORT: 6379 + ROMM_AUTH_SECRET_KEY: + secretKeyRef: + name: romm-secrets + key: ROMM_AUTH_SECRET_KEY + ROMM_AUTH_ENABLED: true + ENABLE_EXPERIMENTAL_REDIS: true + ROMM_AUTH_USERNAME: "{{ .Values.romm.auth.user}}" + ROMM_AUTH_PASSWORD: "{{ .Values.romm.auth.pass}}" persistence: library: @@ -59,12 +78,18 @@ persistence: resources: enabled: true mountPath: /romm/resources + logs: + enabled: true + mountPath: /romm/logs mariadb: enabled: true mariadbUsername: romm mariadbDatabase: romm +redis: + enabled: true + portal: open: enabled: true