From 2e0540dbe3e9cac66d4dbd988d4675c702a135e3 Mon Sep 17 00:00:00 2001 From: Jeff Billimek Date: Fri, 14 Jun 2019 08:04:24 -0400 Subject: [PATCH] extraEnv and forceReDownload options (#14772) Signed-off-by: Jeff Billimek --- stable/minecraft/Chart.yaml | 2 +- stable/minecraft/templates/deployment.yaml | 9 +++++++++ stable/minecraft/values.yaml | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stable/minecraft/Chart.yaml b/stable/minecraft/Chart.yaml index 9fc8bb525e..9ad3e0052f 100755 --- a/stable/minecraft/Chart.yaml +++ b/stable/minecraft/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: minecraft -version: 1.0.1 +version: 1.0.2 appVersion: 1.13.1 home: https://minecraft.net/ description: Minecraft server diff --git a/stable/minecraft/templates/deployment.yaml b/stable/minecraft/templates/deployment.yaml index 5ea5e567b3..bf7c991de5 100644 --- a/stable/minecraft/templates/deployment.yaml +++ b/stable/minecraft/templates/deployment.yaml @@ -85,6 +85,10 @@ spec: value: {{ .Values.minecraftServer.enableCommandBlock | quote }} - name: FORCE_gameMode value: {{ .Values.minecraftServer.forcegameMode | quote }} + {{- if .Values.minecraftServer.forceReDownload }} + - name: FORCE_REDOWNLOAD + value: "TRUE" + {{- end }} - name: GENERATE_STRUCTURES value: {{ .Values.minecraftServer.generateStructures | quote }} - name: HARDCORE @@ -149,6 +153,11 @@ spec: value: {{ .Values.minecraftServer.query.port }} {{- end }} + {{- range $key, $value := .Values.extraEnv }} + - name: {{ $key }} + value: {{ $value }} + {{- end }} + ports: - name: minecraft containerPort: 25565 diff --git a/stable/minecraft/values.yaml b/stable/minecraft/values.yaml index 358e6fdbcd..7765a08253 100644 --- a/stable/minecraft/values.yaml +++ b/stable/minecraft/values.yaml @@ -105,6 +105,8 @@ minecraftServer: worldSaveName: world # If set, this URL will be downloaded at startup and used as a starting point downloadWorldUrl: + # force re-download of server file + forceReDownload: false # If set, the modpack at this URL will be downloaded at startup downloadModpackUrl: # If true, old versions of downloaded mods will be replaced with new ones from downloadModpackUrl @@ -126,6 +128,10 @@ minecraftServer: enabled: false port: 25565 +## Additional minecraft container environment variables +## +extraEnv: {} + persistence: ## minecraft data Persistent Volume Storage Class ## If defined, storageClassName: