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-03 00:57:07 +02:00
committed by GitHub
co-authored by Stavros Kois
parent 5d34ed1449
commit 9ba3c4f3e0
3 changed files with 111 additions and 29 deletions
+1 -2
View File
@@ -24,7 +24,6 @@ name: factorio
sources: sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/factorio - https://github.com/truecharts/charts/tree/master/charts/incubator/factorio
- https://hub.docker.com/factoriotools/factorio - https://hub.docker.com/factoriotools/factorio
- factoriotools/factorio ofsm/ofsm
- https://www.factorio.com/ - https://www.factorio.com/
type: application type: application
version: 2.0.13 version: 3.0.0
+84 -21
View File
@@ -1,18 +1,59 @@
# Include{groups} # Include{groups}
portals: portals: {}
open:
# Include{portalLink}
questions: questions:
# Include{global} # Include{global}
# Include{controller} # Include{controller}
# Include{replicas} # Include{replicas}
# Include{replica1} # Include{replica1}
# Include{controllerExpertExtraArgs} # 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{containerConfig}
# Include{serviceRoot} # Include{serviceRoot}
- variable: main - variable: main
label: "Main Service" label: Main Service
description: "The Primary service on which the healthcheck runs, often the webUI" description: The Primary service on which the healthcheck runs, often the webUI
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -20,26 +61,48 @@ questions:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: main - variable: main
label: "Main Service Port Configuration" label: Main Service Port Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: "Port" label: Port
description: "This port exposes the container port on the service" description: UDP port the server listens on
schema: schema:
type: int type: int
default: 34197 default: 34197
required: true 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} # Include{serviceExpertRoot}
default: false default: false
# Include{serviceExpert} # Include{serviceExpert}
# Include{serviceList} # Include{serviceList}
# Include{persistenceRoot} # Include{persistenceRoot}
- variable: path - variable: path
label: "path Storage" label: path Storage
description: "Container Path factorio" description: Container Path factorio
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -48,7 +111,7 @@ questions:
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
- variable: main - variable: main
label: "Main Ingress" label: Main Ingress
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -60,41 +123,41 @@ 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{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
+26 -6
View File
@@ -1,15 +1,12 @@
env: {}
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: tccr.io/truecharts/factorio repository: tccr.io/truecharts/factorio
tag: vstable@sha256:e4416027bef1991be2d73689402073b85e6f2812bc9c72422990a38a58967eba tag: vstable@sha256:e4416027bef1991be2d73689402073b85e6f2812bc9c72422990a38a58967eba
persistence:
path:
enabled: true
mountPath: /factorio
podSecurityContext: podSecurityContext:
runAsGroup: 0 runAsGroup: 0
runAsUser: 0 runAsUser: 0
probes: probes:
liveness: liveness:
enabled: false enabled: false
@@ -17,9 +14,19 @@ probes:
enabled: false enabled: false
startup: startup:
enabled: false enabled: false
securityContext: securityContext:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
runAsNonRoot: false runAsNonRoot: false
env:
GENERATE_NEW_SAVE: false
LOAD_LATEST_SAVE: true
SAVE_NAME: "_autosave1"
TOKEN: ""
UPDATE_MODS_ON_START: ""
USERNAME: ""
service: service:
main: main:
ports: ports:
@@ -27,6 +34,19 @@ service:
port: 34197 port: 34197
protocol: UDP protocol: UDP
targetPort: 34197 targetPort: 34197
rcon:
enabled: true
ports:
rcon:
enabled: true
port: 27015
protocol: TCP
targetPort: 27015
persistence:
path:
enabled: true
mountPath: /factorio
portal: portal:
enabled: true enabled: false