fix(factorio) fix probes and housekeeping (#12049)

**Description**
Make the ports configurable and set the value to the mods variable +
housekeeping.
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

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

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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 corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 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

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ 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
2023-08-30 16:16:46 -04:00
committed by GitHub
parent 337f2ac4ee
commit 44287ed22c
4 changed files with 46 additions and 39 deletions

View File

@@ -1,27 +1,28 @@
apiVersion: v2
kubeVersion: ">=1.16.0-0"
name: factorio
version: 4.0.9
appVersion: "stable"
description: "This Chart Chart will download the latest stable release of the game, generate the map and you're ready to play."
type: application
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 14.0.3
deprecated: false
description: A game in which you build and maintain factories.
home: https://truecharts.org/charts/incubator/factorio
icon: https://truecharts.org/img/hotlink-ok/chart-icons/factorio.png
keywords:
- factorio
- GameServers
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/factorio
- https://www.factorio.com/
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 13.2.2
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: factorio
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/factorio
- hhttps://www.factorio.com/
- https://github.com/factoriotools/factorio-docker
type: application
version: 4.1.0
annotations:
truecharts.org/catagories: |
- GameServers

View File

@@ -4,9 +4,11 @@ questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
- variable: env
group: App Configuration
label: Image Environment
@@ -42,8 +44,8 @@ questions:
label: Update server mods BEFORE starting the server
description: If mods should be updated before starting the server
schema:
type: string
default: ""
type: boolean
default: false
- variable: USERNAME
label: Factorio.com Username
description: Import your factorio.com username
@@ -106,7 +108,7 @@ questions:
# Include{persistenceRoot}
- variable: config
label: App Config Storage
description: Container Path factorio
description: Stores the Application Config.
schema:
additional_attrs: true
type: dict
@@ -135,7 +137,7 @@ questions:
default: 0
- variable: runAsGroup
label: runAsGroup
description: The groupID this App of the user running the application
description: The groupID of the user running the application
schema:
type: int
default: 0

View File

@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}

View File

@@ -1,7 +1,7 @@
image:
pullPolicy: IfNotPresent
repository: tccr.io/truecharts/factorio
tag: vstable@sha256:6a8a24374e3582abaebf34c9062627914c020d57d2ad88322e53eedf2c767c53
tag: vstable@sha256:110b9147fd5535d4ee6d5b1845b6e0a071a9e8bc4bfe854654c1fa2530d1bd16
securityContext:
container:
@@ -10,33 +10,12 @@ securityContext:
runAsGroup: 0
runAsUser: 0
workload:
main:
podSpec:
containers:
main:
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
env:
GENERATE_NEW_SAVE: false
LOAD_LATEST_SAVE: true
SAVE_NAME: "_autosave1"
TOKEN: ""
UPDATE_MODS_ON_START: ""
USERNAME: ""
service:
main:
ports:
main:
port: 34197
protocol: udp
targetPort: 34197
rcon:
enabled: true
ports:
@@ -44,7 +23,31 @@ service:
enabled: true
port: 27015
protocol: tcp
targetPort: 27015
workload:
main:
podSpec:
containers:
main:
probes:
liveness:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
readiness:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
startup:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
env:
PORT: "{{ .Values.service.main.ports.main.port }}"
RCON_PORT: "{{ .Values.service.rcon.ports.rcon.port }}"
GENERATE_NEW_SAVE: false
LOAD_LATEST_SAVE: true
SAVE_NAME: "_autosave1"
TOKEN: ""
UPDATE_MODS_ON_START: ""
USERNAME: ""
persistence:
config: