fix(ra-rom-processor) refactor code (#4272)

This commit is contained in:
Xstar97 2022-11-01 20:35:14 -04:00 committed by GitHub
parent aa5c5aac7f
commit 485e6bfba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 135 additions and 114 deletions

View File

@ -1,7 +1,3 @@
annotations:
truecharts.org/SCALE-support: "true"
truecharts.org/catagories: |
- MediaApp-Other
apiVersion: v2 apiVersion: v2
appVersion: "latest" appVersion: "latest"
dependencies: dependencies:
@ -9,7 +5,7 @@ dependencies:
repository: https://library-charts.truecharts.org repository: https://library-charts.truecharts.org
version: 10.7.7 version: 10.7.7
deprecated: false deprecated: false
description: RA ROM Processor is a Chart Chart that is used to download/orgainze/process/verify/dedupe/scrape a ROMs library automatically by matching ROMs to the RetroAchievement.org website Hash database. description: Download / Orgainze / Process / Verify / Dedupe / Scrape a ROMs library automatically by matching ROMs to the RetroAchievement.org database.
home: https://truecharts.org/docs/charts/incubator/ra-rom-processor home: https://truecharts.org/docs/charts/incubator/ra-rom-processor
icon: https://truecharts.org/img/hotlink-ok/chart-icons/ra-rom-processor.png icon: https://truecharts.org/img/hotlink-ok/chart-icons/ra-rom-processor.png
keywords: keywords:
@ -27,4 +23,9 @@ sources:
- https://hub.docker.com/r/randomninjaatk/raromprocessor - https://hub.docker.com/r/randomninjaatk/raromprocessor
- https://github.com/RandomNinjaAtk/docker-raromprocessor#instructionsusage-guidelines - https://github.com/RandomNinjaAtk/docker-raromprocessor#instructionsusage-guidelines
type: application type: application
version: 0.0.42 version: 0.0.43
annotations:
truecharts.org/catagories: |
- MediaApp-Other
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U

View File

@ -10,123 +10,135 @@ questions:
# Include{recreate} # Include{recreate}
# Include{controllerExpert} # Include{controllerExpert}
# Include{controllerExpertExtraArgs} # Include{controllerExpertExtraArgs}
- variable: secretEnv
group: Container Configuration
label: Image Secrets
schema:
additional_attrs: true
type: dict
attrs:
- variable: ScreenscraperUsername
label: Screenscraper Username
description: Username for screenscraper.fr.
schema:
type: string
default: ""
- variable: ScreenscraperPassword
label: Screenscraper Password
description: Password for screenscraper.fr.
schema:
type: string
default: ""
- variable: env - variable: env
group: "Container Configuration" group: Container Configuration
label: "Image Environment" label: Image Environment
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: AutoStart - variable: AutoStart
label: "AutoStart" label: Auto Start
description: "true = Enabled Runs script automatically on startup" description: If checked runs script automatically on startup
schema: schema:
type: string type: boolean
default: "" default: false
- variable: ScriptInterval show_subquestions_if: true
label: "ScriptInterval" subquestions:
description: "#s or #m or #h or #d s = seconds, m = minutes, h = hours, d = days Amount of time between each script run, when AUTOSTART is enabled" - variable: ScriptInterval
schema: label: Script Interval
type: string description: "Amount of time between each script run | #s or #m or #h or #d s = seconds, m = minutes, h = hours, d = days."
default: "" schema:
type: string
default: 1h
- variable: DeDupe - variable: DeDupe
label: "DeDupe" label: DeDupe
description: "true = Enabled This setting further reduces the final ROMs list per platrom, by removing duplicates with the priority of USA Europe World Japan, and then by shortest filename when multiples exist" description: If checked this setting further reduces the final ROMs list per platform, by removing duplicates.
schema: schema:
type: string type: boolean
default: "" default: false
- variable: AquireRomSets - variable: AquireRomSets
label: "AquireRomSets" label: Aquire Rom Sets
description: "true = Enabled Enabling this will have the script attempt to pull valid ROM sets from archive.org for processing" description: Enabling this will have the script attempt to pull valid ROM sets from archive.org for processing.
schema: schema:
type: string type: boolean
default: "" default: false
- variable: ConcurrentDownloadThreads show_subquestions_if: true
label: "ConcurrentDownloadThreads" subquestions:
description: "Number of concurrent threads to increase download speed... only aplicable if AquireRomSets is enabled (true)" - variable: ConcurrentDownloadThreads
schema: label: Concurrent Download Threads
type: string description: Number of concurrent threads to increase download speeds.
default: "" schema:
type: int
default: 5
- variable: EnableUnsupportedPlatforms - variable: EnableUnsupportedPlatforms
label: "EnableUnsupportedPlatforms" label: Enable Unsupported Platforms
description: "true = Enabled Enabling this will allow the script to import and scrape ROMs for platforms without RA hashes, no dedupingvalidation is performed" description: Enabling this will allow the script to import and scrape ROMs for platforms without RA hashes.
schema: schema:
type: string type: boolean
default: "" default: false
- variable: ScrapeMetadata - variable: ScrapeMetadata
label: "ScrapeMetadata" label: Scrape Metadata
description: "true = Enabled Enabling this will allow the script to process the ROMs with skyscraper" description: Enabling this will allow the script to process the ROMs with skyscraper.
schema: schema:
type: string type: boolean
default: "" default: false
- variable: keepBackupsOfImportedRoms - variable: keepBackupsOfImportedRoms
label: "keepBackupsOfImportedRoms" label: keep Backups Of Imported Roms
description: "false = Enabled This setting will only keep a single copy of each ROM, reduces the required amount of storage space..." description: If unchecked this setting will only keep a single copy of each ROM, reduces the required amount of storage space.
schema: schema:
type: string type: boolean
default: "" default: true
- variable: skyscraperLanguagePreference - variable: skyscraperLanguagePreference
label: "skyscraperLanguagePreference" label: Skyscaper Language
description: "Set to preferred language for Metadata, for more info visit httpsgithub.commuldjordskyscraperblobmasterdocsLANGUAGES.md#list-of-supported-languages" description: Set to preferred language for Metadata.
schema: schema:
type: string type: string
default: "" default: en
- variable: ScreenscraperUsername # Include{containerConfig}
label: "ScreenscraperUsername"
description: "Username for httpsscreenscraper.fr"
schema:
type: string
default: ""
- variable: ScreenscraperPassword
label: "ScreenscraperPassword"
description: "Password for httpsscreenscraper.fr"
schema:
type: string
default: ""
# Include{serviceExpertRoot} # Include{serviceExpertRoot}
default: false default: false
# Include{serviceExpert} # Include{serviceExpert}
# Include{serviceList} # Include{serviceList}
# Include{persistenceRoot} # Include{persistenceRoot}
- variable: config - variable: config
label: "config Storage" label: App Config Storage
description: "Container Path config" description: Stores the Application Configuration.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
# Include{persistenceAdvanced} # Include{persistenceAdvanced}
- variable: hostpathforcache - variable: cache
label: "hostpathforcache Storage" label: App Cache Storage
description: "cache location for skyscraper." description: Stores the Application Cache.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
# Include{persistenceAdvanced} # Include{persistenceAdvanced}
- variable: hostpathforinput - variable: input
label: "hostpathforinput Storage" label: App Input Storage
description: " Place ROMs to be processed in this directory" description: Stores the Application Input.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
# Include{persistenceAdvanced} # Include{persistenceAdvanced}
- variable: hostpathforoutput - variable: output
label: "hostpathforoutput Storage" label: App Output Storage
description: "ROMs that have been processed will end up here" description: Stores the Application Output.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
# Include{persistenceAdvanced} # Include{persistenceAdvanced}
- variable: hostpathforbackup - variable: backup
label: "hostpathforbackup Storage" label: App Backup Storage
description: "Processed ROMs are backed up to this directory" description: Stores the Application Backup.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@ -138,42 +150,42 @@ questions:
# Include{security} # Include{security}
# Include{securityContextAdvancedRoot} # Include{securityContextAdvancedRoot}
- variable: privileged - variable: privileged
label: "Privileged mode" label: Privileged mode
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: readOnlyRootFilesystem - variable: readOnlyRootFilesystem
label: "ReadOnly Root Filesystem" label: ReadOnly Root Filesystem
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: allowPrivilegeEscalation - variable: allowPrivilegeEscalation
label: "Allow Privilege Escalation" label: Allow Privilege Escalation
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: runAsNonRoot - variable: runAsNonRoot
label: "runAsNonRoot" label: runAsNonRoot
schema: schema:
type: boolean type: boolean
default: false default: false
# Include{securityContextAdvanced} # Include{securityContextAdvanced}
# Include{podSecurityContextRoot} # Include{podSecurityContextRoot}
- variable: runAsUser - variable: runAsUser
label: "runAsUser" label: runAsUser
description: "The UserID of the user running the application" description: The UserID of the user running the application.
schema: schema:
type: int type: int
default: 0 default: 0
- variable: runAsGroup - variable: runAsGroup
label: "runAsGroup" label: runAsGroup
description: The groupID this App of the user running the application" description: The groupID this App of the user running the application.
schema: schema:
type: int type: int
default: 0 default: 0
- variable: fsGroup - variable: fsGroup
label: "fsGroup" label: fsGroup
description: "The group that should own ALL storage." description: The group that should own ALL storage.
schema: schema:
type: int type: int
default: 568 default: 568

View File

@ -1,38 +1,31 @@
env:
AquireRomSets: ""
AutoStart: ""
ConcurrentDownloadThreads: ""
DeDupe: ""
EnableUnsupportedPlatforms: ""
ScrapeMetadata: ""
ScreenscraperPassword: ""
ScreenscraperUsername: ""
ScriptInterval: ""
keepBackupsOfImportedRoms: ""
skyscraperLanguagePreference: ""
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: tccr.io/truecharts/ra-rom-processor repository: tccr.io/truecharts/ra-rom-processor
tag: latest@sha256:19d75d039daa59fc8af491541be84ccbe393183403c9b9e305ebfb0447ed5763 tag: latest@sha256:19d75d039daa59fc8af491541be84ccbe393183403c9b9e305ebfb0447ed5763
persistence:
config:
enabled: true
mountPath: /config
hostpathforbackup:
enabled: true
mountPath: /backup
hostpathforcache:
enabled: true
mountPath: /cache
hostpathforinput:
enabled: true
mountPath: /input
hostpathforoutput:
enabled: true
mountPath: /output
podSecurityContext: podSecurityContext:
runAsGroup: 0 runAsGroup: 0
runAsUser: 0 runAsUser: 0
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
secretEnv:
ScreenscraperPassword: ""
ScreenscraperUsername: ""
env:
AquireRomSets: false
AutoStart: false
ConcurrentDownloadThreads: 1
DeDupe: false
EnableUnsupportedPlatforms: false
ScrapeMetadata: false
ScriptInterval: "1h"
keepBackupsOfImportedRoms: true
skyscraperLanguagePreference: "en"
probes: probes:
liveness: liveness:
enabled: false enabled: false
@ -40,9 +33,7 @@ probes:
enabled: false enabled: false
startup: startup:
enabled: false enabled: false
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
service: service:
main: main:
enabled: false enabled: false
@ -50,5 +41,22 @@ service:
main: main:
enabled: false enabled: false
persistence:
config:
enabled: true
mountPath: /config
cache:
enabled: true
mountPath: /cache
input:
enabled: true
mountPath: /input
output:
enabled: true
mountPath: /output
backup:
enabled: true
mountPath: /backup
portal: portal:
enabled: false enabled: false