feat(romm) add cnpg support **BREAKING CHANGES** (#48982)

**Description**
adding CNPG support and commenting all the current variables

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

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

**🧪 How Has This Been Tested?**
Tested locallly with app-template <3

**📃 Notes:**
Postgres is better

**✔️ 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 changes to the documentation
- [ ] 🧪 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
- [X] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

**➕ 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
2026-06-10 11:04:00 +02:00
committed by GitHub
parent ec8970a561
commit 7d66ae62c1
4 changed files with 171 additions and 87 deletions
+1 -1
View File
@@ -50,5 +50,5 @@ sources:
- https://github.com/trueforge-org/truecharts/tree/master/charts/stable/romm
- https://github.com/zurdi15/romm
type: application
version: 17.6.6
version: 18.0.0
-13
View File
@@ -1,13 +0,0 @@
{{/* 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 -}}
+1 -11
View File
@@ -1,11 +1 @@
{{/* 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" . -}}
{{ include "tc.v1.common.loader.all" . }}
+169 -62
View File
@@ -32,77 +32,183 @@ workload:
startup:
type: http
env:
# dont touch!
ROMM_BASE_PATH: /romm
ROMM_HOST: localhost
# IGDB client id and secret (not required but recommended to set)
IGDB_CLIENT_ID: ""
IGDB_CLIENT_SECRET: ""
# optional api
# STEAMGRIDDB_API_KEY: ""
# paid API only (optional)
# MOBYGAMES_API_KEY: ""
# Disables playing in browser with EmulatorJS (builtin)
# DISABLE_EMULATOR_JS: false
# Disables playing flash games with RuffleRS (builtin)
# DISABLE_RUFFLE_RS: false
# application settings
# Generate a key with openssl rand -hex 32 ✓
# required
ROMM_AUTH_SECRET_KEY: "CHANGE_ME-CHANGE_ME-CHANGE_ME-CHANGE_ME-CHANGE_ME-CHANGE_ME"
# Disables CSRF protection (not recommended)
# DISABLE_CSRF_PROTECTION: false
# Disable auth on download endpoint (WebRcade, Tinfoil)
# DISABLE_DOWNLOAD_ENDPOINT_AUTH: false
# Timeout for the background scan/rescan tasks (in seconds)
# Disables login with username and password (when using OIDC)
# DISABLE_USERPASS_LOGIN: false
# Maximum age of a session (in seconds) 1209600 (14 days) defaults
# SESSION_MAX_AGE_SECONDS: 1209600
# Read-only mode for public displays or kiosks
# KIOSK_MODE: false
# Timeout for the background scan/rescan tasks (in seconds) 14400 (4 hours)
# SCAN_TIMEOUT: 14400
# Number of worker processes for scanning tasks
SCAN_WORKERS: 4
# Timeout for the the rest of the background tasks (in seconds) 300 (5 minutes)
# TASK_TIMEOUT: 300
# How long to keep task results in Valkey (in seconds) 86400 (24 hours)
# TASK_RESULT_TTL: 86400
# Timeout for 7-Zip operations (in seconds)
# SEVEN_ZIP_TIMEOUT: 60
# Disables playing in browser with EmulatorJS
# DISABLE_EMULATOR_JS: false
# Disables playing flash games with RuffleRS
# DISABLE_RUFFLE_RS: false
# Base URL for alternate frontends (Piped, Invidious, etc.)
# YOUTUBE_BASE_URL: https://www.youtube.com
# Port on which the application listens
ROMM_PORT: "{{ .Values.service.main.ports.main.port }}"
# Base folder path for library, resources and assets
# ROMM_BASE_PATH: /romm/
# Base url for properly display container logs links (like register or recover password)
# should populate the correct url whether ingress is enabled or not
ROMM_BASE_URL: "{{ .Values.chartContext.appUrl }}"
# Logging level for the app
# DEBUG | INFO
LOGLEVEL: INFO
# Forces color output
# FORCE_COLOR: false
# Disables color output
# NO_COLOR: false
# Number of processes running the app
# WEB_SERVER_CONCURRENCY: 1
# Waiting time for requests on a Keep-Alive connection (in seconds)
# WEB_SERVER_KEEPALIVE: 2
# Maximum number of requests a worker will process before restarting
# WEB_SERVER_MAX_REQUESTS: 1000
# Random jitter to add to the maximum number of requests a worker will process before restarting
# WEB_SERVER_MAX_REQUESTS_JITTER: 100
# Timeout for web server requests (in seconds)
# WEB_SERVER_TIMEOUT: 300
# Maximum number of simultaneous clients a single process can handle
# WEB_SERVER_WORKER_CONNECTIONS: 1000
# Enable rescanning of library when filesystem changes
# Dependencies
# Database driver to use (options: mariadb, mysql, postgresql)
ROMM_DB_DRIVER: postgresql
DB_HOST: "{{ .Values.cnpg.main.creds.host }}"
DB_PORT: 5432
DB_NAME: "{{ .Values.cnpg.main.database }}"
DB_USER: "{{ .Values.cnpg.main.user }}"
DB_PASSWD: "{{ .Values.cnpg.main.creds.password }}"
# Extra query parameters for the database connection, in JSON format (e.g. {"unix_socket": "/path/to/db"})
# DB_QUERY_JSON: ""
# Host name of Redis/Valkey instance
REDIS_HOST: '{{ .Values.redis.creds.plainhost | trimAll "\"" }}'
# Port number of Redis/Valkey instance
REDIS_PORT: 6379
# Username for Redis/Valkey instance
REDIS_USERNAME: "default"
# Password for Redis/Valkey instance
REDIS_PASSWORD: "{{ .Values.redis.password }}"
# Database number for Redis/Valkey instance
# REDIS_DB: 0
# Enable SSL for Redis/Valkey instance
# REDIS_SSL: false
# DSN for Sentry error tracking
# SENTRY_DSN
# Metadata providers
# Client ID for IGDB API
IGDB_CLIENT_ID: ""
# Client secret for IGDB API
IGDB_CLIENT_SECRET: ""
# Screenscraper username
# SCREENSCRAPER_USER: ""
# Screenscraper password
# SCREENSCRAPER_PASSWORD: ""
# MobyGames secret API key
# MOBYGAMES_API_KEY: ""
# SteamGridDB secret API key
# STEAMGRIDDB_API_KEY: ""
# Retroachievements secret API key
# RETROACHIEVEMENTS_API_KEY: ""
# Retroachievements metadata cache refresh (in days)
# REFRESH_RETROACHIEVEMENTS_CACHE_DAYS: 30
# Enable LaunchBox API integration
# LAUNCHBOX_API_ENABLED: true
# Enable PlayMatch API integration
# PLAYMATCH_API_ENABLED: true
# Enable Hasheous API integration
# HASHEOUS_API_ENABLED: true
# Enable Flashpoint API integration
# FLASHPOINT_API_ENABLED: true
# Enable HowLongToBeat API integration
# HLTB_API_ENABLED: true
# Authentication
# Enable OpenID Connect (OIDC) authentication
# OIDC_ENABLED: false
# Name of the OIDC provider in use
# OIDC_PROVIDER: authelia
# Client ID for OIDC authentication
# OIDC_CLIENT_ID: romm
# Client secret for OIDC authentication
# OIDC_CLIENT_SECRET: ""
# Absolute redirect URI for OIDC authentication
# OIDC_REDIRECT_URI: https://romm.example.com/api/oauth/openid
# Absolute URL of the OIDC server application
# OIDC_SERVER_APPLICATION_URL: https://auth.example.com
# Path to a file containing trusted CA certificates
# OIDC_TLS_CACERTFILE: ""
# Access token lifetime (in seconds) 1800 (30 minutes)
# OAUTH_ACCESS_TOKEN_EXPIRE_SECONDS: 1800
# Refresh token lifetime (in seconds) 604800 (7 days)
# OAUTH_REFRESH_TOKEN_EXPIRE_SECONDS: 604800
# Invite token lifetime (in seconds) 600 (10 minutes)
# INVITE_TOKEN_EXPIRY_SECONDS: 600
# URL to the OIDC provider metadata endpoint
# OIDC_SERVER_METADATA_URL: ""
# Enable RP-initiated logout flow
# OIDC_RP_INITIATED_LOGOUT: false
# OIDC end-session endpoint override URL
# OIDC_END_SESSION_ENDPOINT: ""
# Attribute on OIDC user info used as the username preferred_username
# OIDC_USERNAME_ATTRIBUTE: preferred_username
# Skip click OIDC button on login page
# OIDC_AUTOLOGIN: false
# OIDC claim containing user roles
# OIDC_CLAIM_ROLES: ""
# Role value mapping to viewer permissions
# OIDC_ROLE_VIEWER: ""
# Role value mapping to editor permissions
# OIDC_ROLE_EDITOR: ""
# Role value mapping to admin permissions
# OIDC_ROLE_ADMIN: ""
# Background tasks
# Enable re-scanning of library when filesystem changes
# ENABLE_RESCAN_ON_FILESYSTEM_CHANGE: false
# Delay in minutes before rescanning library when filesystem changes
# Delay before re-scanning library when filesystem changes (in minutes) 5
# RESCAN_ON_FILESYSTEM_CHANGE_DELAY: 5
# Cron expression for scheduled rescanning
# Enable scheduled re-scanning of library
# ENABLE_SCHEDULED_RESCAN: false
# Cron expression for scheduled re-scanning
# SCHEDULED_RESCAN_CRON: "0 3 * * *"
# Enable scheduled updating of Switch TitleDB index
# ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB: false
# Cron expression for scheduled updating of Switch TitleDB
# SCHEDULED_UPDATE_SWITCH_TITLEDB_CRON: "0 4 * * *"
# Enable scheduled updating of MAME XML index
# ENABLE_SCHEDULED_UPDATE_MAME_XML: false
# Cron expression for scheduled updating of MAME XML
# SCHEDULED_UPDATE_MAME_XML_CRON: "0 5 * * *"
DB_PORT: 3306
DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}"
DB_USER: "{{ .Values.mariadb.mariadbUsername }}"
DB_HOST:
secretKeyRef:
expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
key: plainhost
DB_PASSWD: "{{ .Values.mariadb.password }}"
REDIS_HOST:
secretKeyRef:
expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}'
key: plainhost
REDIS_PASSWORD: "{{ .Values.redis.password }}"
REDIS_PORT: 6379
ROMM_AUTH_SECRET_KEY:
secretKeyRef:
name: romm-secrets
key: ROMM_AUTH_SECRET_KEY
# Enable scheduled updating of LaunchBox metadata
# ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA: false
# Cron expression for scheduled updating of LaunchBox metadata
# SCHEDULED_UPDATE_LAUNCHBOX_METADATA_CRON: "0 4 * * *"
# Enable scheduled conversion of images to WebP format
# ENABLE_SCHEDULED_CONVERT_IMAGES_TO_WEBP: false
# Cron expression for scheduled conversion of images to WebP format
# SCHEDULED_CONVERT_IMAGES_TO_WEBP_CRON: "0 4 * * *"
# Enable scheduled syncing of Retroachievements progress
# ENABLE_SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC: false
# Cron expression for scheduled syncing of Retroachievements progress
# SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC_CRON: "0 4 * * *"
persistence:
library:
@@ -118,10 +224,11 @@ persistence:
enabled: true
mountPath: /romm/assets
mariadb:
enabled: true
mariadbUsername: romm
mariadbDatabase: romm
cnpg:
main:
enabled: true
user: romm
database: romm
redis:
enabled: true