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 23:16:46 +03:00
committed by GitHub
parent 337f2ac4ee
commit 44287ed22c
4 changed files with 46 additions and 39 deletions
+13 -12
View File
@@ -1,27 +1,28 @@
apiVersion: v2 apiVersion: v2
kubeVersion: ">=1.16.0-0"
name: factorio
version: 4.0.9
appVersion: "stable" appVersion: "stable"
description: "This Chart Chart will download the latest stable release of the game, generate the map and you're ready to play." dependencies:
type: application - name: common
repository: https://library-charts.truecharts.org
version: 14.0.3
deprecated: false deprecated: false
description: A game in which you build and maintain factories.
home: https://truecharts.org/charts/incubator/factorio home: https://truecharts.org/charts/incubator/factorio
icon: https://truecharts.org/img/hotlink-ok/chart-icons/factorio.png icon: https://truecharts.org/img/hotlink-ok/chart-icons/factorio.png
keywords: keywords:
- factorio - factorio
- GameServers - GameServers
sources: kubeVersion: ">=1.16.0-0"
- 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
maintainers: maintainers:
- email: info@truecharts.org - email: info@truecharts.org
name: TrueCharts name: TrueCharts
url: https://truecharts.org 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: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- GameServers - GameServers
+6 -4
View File
@@ -4,9 +4,11 @@ questions:
# Include{global} # Include{global}
# Include{workload} # Include{workload}
# Include{workloadDeployment} # Include{workloadDeployment}
# Include{replicas1} # Include{replicas1}
# Include{podSpec} # Include{podSpec}
# Include{containerMain} # Include{containerMain}
- variable: env - variable: env
group: App Configuration group: App Configuration
label: Image Environment label: Image Environment
@@ -42,8 +44,8 @@ questions:
label: Update server mods BEFORE starting the server label: Update server mods BEFORE starting the server
description: If mods should be updated before starting the server description: If mods should be updated before starting the server
schema: schema:
type: string type: boolean
default: "" default: false
- variable: USERNAME - variable: USERNAME
label: Factorio.com Username label: Factorio.com Username
description: Import your factorio.com username description: Import your factorio.com username
@@ -106,7 +108,7 @@ questions:
# Include{persistenceRoot} # Include{persistenceRoot}
- variable: config - variable: config
label: App Config Storage label: App Config Storage
description: Container Path factorio description: Stores the Application Config.
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -135,7 +137,7 @@ questions:
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 of the user running the application
schema: schema:
type: int type: int
default: 0 default: 0
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
+26 -23
View File
@@ -1,7 +1,7 @@
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: tccr.io/truecharts/factorio repository: tccr.io/truecharts/factorio
tag: vstable@sha256:6a8a24374e3582abaebf34c9062627914c020d57d2ad88322e53eedf2c767c53 tag: vstable@sha256:110b9147fd5535d4ee6d5b1845b6e0a071a9e8bc4bfe854654c1fa2530d1bd16
securityContext: securityContext:
container: container:
@@ -10,33 +10,12 @@ securityContext:
runAsGroup: 0 runAsGroup: 0
runAsUser: 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: service:
main: main:
ports: ports:
main: main:
port: 34197 port: 34197
protocol: udp protocol: udp
targetPort: 34197
rcon: rcon:
enabled: true enabled: true
ports: ports:
@@ -44,7 +23,31 @@ service:
enabled: true enabled: true
port: 27015 port: 27015
protocol: tcp 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: persistence:
config: config: