feat(Factorio): Add proper Env Vars/Ports before Stable (#6743)

* feat(Factorio): Add proper Env Vars/Ports before Stable

* lint

* fix suggestions from code review

* fix types?

* Why is this failing Chart.yaml

* Catalog wants this one then fine

* If the CI wants OFSM/OFSM then I dunno

* ?

* indent

* fi

---------

Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
StevenMcElligott 2023-02-02 17:57:07 -05:00 committed by GitHub
parent 5d34ed1449
commit 9ba3c4f3e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 111 additions and 29 deletions

View File

@ -24,7 +24,6 @@ name: factorio
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/factorio
- https://hub.docker.com/factoriotools/factorio
- factoriotools/factorio ofsm/ofsm
- https://www.factorio.com/
type: application
version: 2.0.13
version: 3.0.0

View File

@ -1,18 +1,59 @@
# Include{groups}
portals:
open:
# Include{portalLink}
portals: {}
questions:
# Include{global}
# Include{controller}
# Include{replicas}
# Include{replica1}
# Include{controllerExpertExtraArgs}
- variable: env
group: App Configuration
label: Image Environment
schema:
additional_attrs: true
type: dict
attrs:
- variable: GENERATE_NEW_SAVE
label: Generate new save on startup
description: Generate a new save if one does not exist before starting the server
schema:
type: boolean
default: false
- variable: LOAD_LATEST_SAVE
label: Load latest save game
description: Load latest when true. Otherwise load SAVE_NAME
schema:
type: boolean
default: true
- variable: SAVE_NAME
label: Game save name (change this to use multiple saves)
description: Name to use for the save file
schema:
type: string
default: _autosave1
- variable: TOKEN
label: Factorio.com Token
description: Import your factorio.com token
schema:
type: string
default: ""
- variable: UPDATE_MODS_ON_START
label: Update server mods BEFORE starting the server
description: If mods should be updated before starting the server
schema:
type: string
default: ""
- variable: USERNAME
label: Factorio.com Username
description: Import your factorio.com username
schema:
type: string
default: ""
# Include{containerConfig}
# Include{serviceRoot}
- variable: main
label: "Main Service"
description: "The Primary service on which the healthcheck runs, often the webUI"
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
@ -20,26 +61,48 @@ questions:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: "Main Service Port Configuration"
label: Main Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: "Port"
description: "This port exposes the container port on the service"
label: Port
description: UDP port the server listens on
schema:
type: int
default: 34197
required: true
- variable: rcon
label: Rcon Port
description: TCP port the rcon server listens on
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: rcon
label: Rcon Server Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 27015
required: true
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: path
label: "path Storage"
description: "Container Path factorio"
label: path Storage
description: Container Path factorio
schema:
additional_attrs: true
type: dict
@ -48,7 +111,7 @@ questions:
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: "Main Ingress"
label: Main Ingress
schema:
additional_attrs: true
type: dict
@ -60,41 +123,41 @@ questions:
# Include{security}
# Include{securityContextAdvancedRoot}
- variable: privileged
label: "Privileged mode"
label: Privileged mode
schema:
type: boolean
default: false
- variable: readOnlyRootFilesystem
label: "ReadOnly Root Filesystem"
label: ReadOnly Root Filesystem
schema:
type: boolean
default: false
- variable: allowPrivilegeEscalation
label: "Allow Privilege Escalation"
label: Allow Privilege Escalation
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: "runAsNonRoot"
label: runAsNonRoot
schema:
type: boolean
default: false
# Include{podSecurityContextRoot}
- variable: runAsUser
label: "runAsUser"
description: "The UserID of the user running the application"
label: runAsUser
description: The UserID of the user running the application
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: The groupID this App of the user running the application"
label: runAsGroup
description: The groupID this App of the user running the application
schema:
type: int
default: 0
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
label: fsGroup
description: The group that should own ALL storage.
schema:
type: int
default: 568

View File

@ -1,15 +1,12 @@
env: {}
image:
pullPolicy: IfNotPresent
repository: tccr.io/truecharts/factorio
tag: vstable@sha256:e4416027bef1991be2d73689402073b85e6f2812bc9c72422990a38a58967eba
persistence:
path:
enabled: true
mountPath: /factorio
podSecurityContext:
runAsGroup: 0
runAsUser: 0
probes:
liveness:
enabled: false
@ -17,9 +14,19 @@ probes:
enabled: false
startup:
enabled: false
securityContext:
readOnlyRootFilesystem: false
runAsNonRoot: false
env:
GENERATE_NEW_SAVE: false
LOAD_LATEST_SAVE: true
SAVE_NAME: "_autosave1"
TOKEN: ""
UPDATE_MODS_ON_START: ""
USERNAME: ""
service:
main:
ports:
@ -27,6 +34,19 @@ service:
port: 34197
protocol: UDP
targetPort: 34197
rcon:
enabled: true
ports:
rcon:
enabled: true
port: 27015
protocol: TCP
targetPort: 27015
persistence:
path:
enabled: true
mountPath: /factorio
portal:
enabled: true
enabled: false