From 44287ed22cbcf2300cc7ac44527c0cdd172b80c6 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:16:46 -0400 Subject: [PATCH] fix(factorio) fix probes and housekeeping (#12049) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Make the ports configurable and set the value to the mods variable + housekeeping. ⚒️ Fixes # **⚙️ 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?** **📃 Notes:** **✔️ 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._ --- charts/incubator/factorio/Chart.yaml | 25 +++++----- charts/incubator/factorio/questions.yaml | 10 ++-- charts/incubator/factorio/templates/NOTES.txt | 1 + charts/incubator/factorio/values.yaml | 49 ++++++++++--------- 4 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 charts/incubator/factorio/templates/NOTES.txt diff --git a/charts/incubator/factorio/Chart.yaml b/charts/incubator/factorio/Chart.yaml index 61ed9ca22cc..066c4fa668d 100644 --- a/charts/incubator/factorio/Chart.yaml +++ b/charts/incubator/factorio/Chart.yaml @@ -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 diff --git a/charts/incubator/factorio/questions.yaml b/charts/incubator/factorio/questions.yaml index 93d2c47cbca..2dfa45adfe9 100644 --- a/charts/incubator/factorio/questions.yaml +++ b/charts/incubator/factorio/questions.yaml @@ -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 diff --git a/charts/incubator/factorio/templates/NOTES.txt b/charts/incubator/factorio/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/factorio/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/factorio/values.yaml b/charts/incubator/factorio/values.yaml index a6b0e44c8ca..d0dccd96096 100644 --- a/charts/incubator/factorio/values.yaml +++ b/charts/incubator/factorio/values.yaml @@ -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: