From af76d0cc6410ece132fd22046a87259be281cf0e Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 27 Feb 2022 16:41:29 +0200 Subject: [PATCH] fix(minecraft-java): Fix variable type in questions and add UID variable (#1974) * fix(minecraft-java): Fix variable type in questions and add UID variable * runas root * rofs * use PUID --- charts/games/minecraft-java/Chart.yaml | 2 +- charts/games/minecraft-java/questions.yaml | 16 +++++++++++----- charts/games/minecraft-java/values.yaml | 10 ++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/charts/games/minecraft-java/Chart.yaml b/charts/games/minecraft-java/Chart.yaml index 0d53540ed5e..d3d54e2add1 100644 --- a/charts/games/minecraft-java/Chart.yaml +++ b/charts/games/minecraft-java/Chart.yaml @@ -20,7 +20,7 @@ sources: - https://github.com/itzg/docker-minecraft-server - https://hub.docker.com/r/itzg/minecraft-server type: application -version: 0.0.12 +version: 0.0.13 annotations: truecharts.org/catagories: | - games diff --git a/charts/games/minecraft-java/questions.yaml b/charts/games/minecraft-java/questions.yaml index aca0f21bf60..d5a059d64a4 100644 --- a/charts/games/minecraft-java/questions.yaml +++ b/charts/games/minecraft-java/questions.yaml @@ -101,6 +101,12 @@ questions: type: dict attrs: # Include{fixedEnv} + - variable: PUID + label: "PUID" + description: "Sets the PUID env var" + schema: + type: int + default: 568 - variable: EULA label: "Minecraft Eula - Link in readme sources" schema: @@ -227,9 +233,9 @@ questions: - variable: PAPER_DOWNLOAD_URL label: "Paper Download URL" schema: - type: int + type: string required: false - default: 0 + default: "" show_if: [[TYPE, "=", "PAPER"]] - variable: PACKWIZ_URL label: "Packwiz URL" @@ -739,7 +745,7 @@ questions: label: "runAsNonRoot" schema: type: boolean - default: true + default: false # Include{securityContextAdvanced} - variable: podSecurityContext @@ -754,13 +760,13 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 568 + default: 0 - variable: runAsGroup label: "runAsGroup" description: The groupID this App of the user running the application" schema: type: int - default: 568 + default: 0 - variable: fsGroup label: "fsGroup" description: "The group that should own ALL storage." diff --git a/charts/games/minecraft-java/values.yaml b/charts/games/minecraft-java/values.yaml index 66112574e00..14674dffb49 100644 --- a/charts/games/minecraft-java/values.yaml +++ b/charts/games/minecraft-java/values.yaml @@ -22,7 +22,17 @@ j8j9Image: portal: enabled: false +securityContext: + readOnlyRootFilesystem: false + runAsNonRoot: false + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + env: + PUID: 568 + UID: "{{ .Values.env.PUID }}" EULA: "TRUE" VERSION: "LATEST" TYPE: "VANILLA"