From bc1a49ca4f37ea20888b7d55424c32e77d9b90db Mon Sep 17 00:00:00 2001 From: Cedric Lewe <43417046+0SkillAllLuck@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:57:39 +0000 Subject: [PATCH] Add customCommand and customArgs --- charts/minecraft-server/Chart.yaml | 2 +- charts/minecraft-server/questions.yml | 16 ++++++++++++++++ .../minecraft-server/templates/deployment.yaml | 4 ++++ charts/minecraft-server/values.yaml | 4 ++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/charts/minecraft-server/Chart.yaml b/charts/minecraft-server/Chart.yaml index 7301188..e13f303 100644 --- a/charts/minecraft-server/Chart.yaml +++ b/charts/minecraft-server/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: minecraft-server -version: 0.1.804 +version: 0.1.805 appVersion: v0.1.8 description: Docker Minecraft Server image with support for Plugins etc. home: https://github.com/qumine/minecraft-server diff --git a/charts/minecraft-server/questions.yml b/charts/minecraft-server/questions.yml index 8b0aa1c..ea86983 100644 --- a/charts/minecraft-server/questions.yml +++ b/charts/minecraft-server/questions.yml @@ -51,6 +51,22 @@ questions: required: true label: Custom URL group: Server +- variable: server.customCommand + if: "server.eula == true && server.type == \"CUSTOM\"" + default: "java" + description: The download URL for the custom server.jar to install + type: string + required: true + label: Custom URL + group: Server +- variable: server.customArgs + if: "server.eula == true && server.type == \"CUSTOM\"" + default: "-jar,server.jar,nogui" + description: The download URL for the custom server.jar to install + type: string + required: true + label: Custom URL + group: Server - variable: server.starterJarURL if: "server.eula == true && server.type == \"STARTER\"" default: https://github.com/Yoosk/ServerStarter/releases/download/v2.1.0/serverstarter-2.1.0.jar diff --git a/charts/minecraft-server/templates/deployment.yaml b/charts/minecraft-server/templates/deployment.yaml index cf36ed8..7710699 100644 --- a/charts/minecraft-server/templates/deployment.yaml +++ b/charts/minecraft-server/templates/deployment.yaml @@ -70,6 +70,10 @@ spec: {{- if (eq .Values.server.type "CUSTOM") }} - name: SERVER_CUSTOM_URL value: {{ .Values.server.customURL }} + - name: SERVER_CUSTOM_COMMAND + value: {{ .Values.server.customCommand }} + - name: SERVER_CUSTOM_ARGS + value: {{ .Values.server.customArgs }} {{- else if (eq .Values.server.type "STARTER") }} - name: SERVER_STARTER_JAR_URL value: {{ .Values.server.starterJarURL }} diff --git a/charts/minecraft-server/values.yaml b/charts/minecraft-server/values.yaml index b741096..4bf97b1 100644 --- a/charts/minecraft-server/values.yaml +++ b/charts/minecraft-server/values.yaml @@ -44,6 +44,10 @@ server: forceUpdate: false # The version of server to download/start. customURL: "latest" + # The custom command to execute + customCommand: "java" + # The version of server to download/start. + customArgs: "-jar,server.jar,nogui" # The url for the ServerStarter jar file. starterJarURL: "https://github.com/Yoosk/ServerStarter/releases/download/v2.1.0/serverstarter-2.1.0.jar" # The url for the ServerStarter server-setup-config file.