From 9b0c3308116aacd276a6c30c971afe07a8b27aeb Mon Sep 17 00:00:00 2001 From: Ed P Date: Sun, 14 Jan 2024 16:53:13 -0600 Subject: [PATCH] fix(minecraft-java): mcbackup wrong service name in host (#17089) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** The "mcbackup" container in the minecraft-java chart was not working properly due to the RCON port and backup mounts, as well as a minor typo in the default backup interval. I run a Minecraft server via this chart and was unable to backup using the built in option, but this chart update corrects the issues I was having. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Tested using TrueNAS SCALE installation via Helm. Logs of the mcbackup container were audited and tested repeatedly as well as tested the backup archive themselves. **📃 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 - [X] ⚠️ 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._ --------- Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/stable/minecraft-java/Chart.yaml | 2 +- charts/stable/minecraft-java/questions.yaml | 2 +- charts/stable/minecraft-java/values.yaml | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/charts/stable/minecraft-java/Chart.yaml b/charts/stable/minecraft-java/Chart.yaml index b4dac81c176..3be9b654eaf 100644 --- a/charts/stable/minecraft-java/Chart.yaml +++ b/charts/stable/minecraft-java/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://hub.docker.com/r/itzg/minecraft-server - https://github.com/itzg/docker-minecraft-server type: application -version: 7.1.6 +version: 7.1.7 diff --git a/charts/stable/minecraft-java/questions.yaml b/charts/stable/minecraft-java/questions.yaml index 824c4ad3c01..5f43287ab84 100644 --- a/charts/stable/minecraft-java/questions.yaml +++ b/charts/stable/minecraft-java/questions.yaml @@ -652,7 +652,7 @@ questions: label: Backup Interval schema: type: string - default: 24hr + default: 24h - variable: player_online_check_interval label: Player Online Check Interval schema: diff --git a/charts/stable/minecraft-java/values.yaml b/charts/stable/minecraft-java/values.yaml index da81056640e..7f0fc841e1a 100644 --- a/charts/stable/minecraft-java/values.yaml +++ b/charts/stable/minecraft-java/values.yaml @@ -85,7 +85,7 @@ service: mcbackup: enabled: true initial_delay: 2m - backup_interval: 24hr + backup_interval: 24h player_online_check_interval: 5m prune_backups_days: 7 pause_if_no_players: false @@ -233,7 +233,7 @@ workload: DEST_DIR: "{{.Values.persistence.backups.mountPath }}" SRC_DIR: "{{.Values.persistence.data.mountPath }}" SERVER_PORT: "{{ .Values.service.main.ports.main.port }}" - RCON_HOST: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}' + RCON_HOST: '{{ printf "%s-rcon" (include "tc.v1.common.lib.chart.names.fullname" $) }}' RCON_PORT: "{{ .Values.service.rcon.ports.rcon.port }}" RCON_PASSWORD: "{{ .Values.workload.main.podSpec.containers.main.env.RCON_PASSWORD }}" INITIAL_DELAY: "{{ .Values.mcbackup.initial_delay }}" @@ -259,7 +259,10 @@ persistence: readOnly: true backups: enabled: true - mountPath: /backups + targetSelector: + mcbackup: + mcbackup: + mountPath: /backups portal: open: