diff --git a/charts/incubator/palworld/Chart.yaml b/charts/incubator/palworld/Chart.yaml index eeb626c8803..8d560629e03 100644 --- a/charts/incubator/palworld/Chart.yaml +++ b/charts/incubator/palworld/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/palworld - https://ghcr.io/ich777/steamcmd type: application -version: 0.0.1 +version: 0.0.2 diff --git a/charts/incubator/palworld/icon.jpg b/charts/incubator/palworld/icon.jpg deleted file mode 100644 index 79d563a60cd..00000000000 Binary files a/charts/incubator/palworld/icon.jpg and /dev/null differ diff --git a/charts/incubator/palworld/icon.png b/charts/incubator/palworld/icon.png new file mode 100644 index 00000000000..9e3332b10bf Binary files /dev/null and b/charts/incubator/palworld/icon.png differ diff --git a/charts/incubator/palworld/questions.yaml b/charts/incubator/palworld/questions.yaml index e5fab2b3b05..c52fa4ee2f9 100644 --- a/charts/incubator/palworld/questions.yaml +++ b/charts/incubator/palworld/questions.yaml @@ -31,6 +31,31 @@ questions: type: string required: true default: "2394010" + - variable: name + label: Server Name + description: The name of your server. + schema: + type: string + default: "TrueCharts Palworld Server" + - variable: description + label: Server Description + description: The description of your server. + schema: + type: string + default: "A Palworld Server running in Kubernetes" + - variable: max_players + label: Max Players + description: The max players that can play on your server. + schema: + type: int + default: 32 + - variable: password + label: Server Password + description: Optionally set a password for the server. + schema: + type: string + private: true + default: "" - variable: steam label: Steam Configuration schema: @@ -82,7 +107,7 @@ questions: schema: type: list default: - - -No-useperfthreads + - -useperfthreads - -NoAsyncLoadingThread - -UseMultithreadForDS required: true @@ -168,15 +193,6 @@ questions: attrs: # Include{persistenceBasic} # Include{persistenceList} -# Include{ingressRoot} - - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: -# Include{ingressDefault} -# Include{ingressAdvanced} # Include{ingressList} # Include{securityContextRoot} - variable: runAsUser diff --git a/charts/incubator/palworld/values.yaml b/charts/incubator/palworld/values.yaml index 338bce430b8..b6612858b7d 100644 --- a/charts/incubator/palworld/values.yaml +++ b/charts/incubator/palworld/values.yaml @@ -26,15 +26,19 @@ service: palworld: game: id: "2394010" + name: "TrueCharts Palworld Server" + description: "A Palworld Server running in Kubernetes" + max_players: 32 + password: "" steam: username: "" password: "" admin: - password: adminDocker + password: "" params: - EpicApp=PalServer params_extra: - - -No-useperfthreads + - -useperfthreads - -NoAsyncLoadingThread - -UseMultithreadForDS update_public_ip: false @@ -53,23 +57,40 @@ workload: - -c args: - | - config=/serverdata/serverfiles/Pal/Saved/Config/LinuxServer + config={{ .Values.persistence.serverfiles.targetSelector.main.main.mountPath }}/Pal/Saved/Config/LinuxServer cfgFile=${config}/PalWorldSettings.ini + rconPort={{ .Values.service.rcon.ports.rcon.port }} + mainPort={{ .Values.service.main.ports.main.port }} + name="{{ .Values.palworld.game.name }}" + description="{{ .Values.palworld.game.description }}" + maxPlayers={{ .Values.palworld.game.max_players }} + gamePass={{ .Values.palworld.game.password }} + adminPass={{ .Values.palworld.admin.password }} + mkdir -p ${config} if [ ! -f ${cfgFile} ]; then echo "Config file not found, fetching..." # Fetch the config file if it doesn't exist, just like the container does wget -qO ${cfgFile} https://github.com/ich777/docker-steamcmd-server/raw/palworld/config/PalWorldSettings.ini fi - echo "Setting RCON status..." - sed -i 's/\(RCONEnabled=\)[^,]*/\1True/g' ${cfgFile} - echo "Set to [$(grep -Po 'RCONEnabled=[^,]*' ${cfgFile})]" - echo "Setting RCON Port..." - sed -i 's/\(RCONPort=\)[^,]*/\1{{ .Values.service.rcon.ports.rcon.port }}/g' ${cfgFile} - echo "Set to [$(grep -Po 'RCONPort=[^,]*' ${cfgFile})]" - echo "Setting Game Port..." - sed -i 's/\(PublicPort=\)[^,]*/\1{{ .Values.service.main.ports.main.port }}/g' ${cfgFile} - echo "Set to [$(grep -Po 'PublicPort=[^,]*' ${cfgFile})]" + + set_ini_value() { + local key="${1}" + local value="${2}" + + echo "Setting ${key}..." + sed -i "s|\(${key}=\)[^,]*|\1${value}|g" "${cfgFile}" + echo "Set to $(grep -Po "${key}=[^,]*" "${cfgFile}")" + } + + set_ini_value "RCONEnabled" "True" + set_ini_value "RCONPort" "${rconPort}" + set_ini_value "PublicPort" "${mainPort}" + set_ini_value "ServerName" "${name}" + set_ini_value "ServerDescription" "${description}" + set_ini_value "ServerPlayerMaxNum" "${maxPlayers}" + set_ini_value "ServerPassword" "${gamePass}" + set_ini_value "AdminPassword" "${adminPass}" echo "Done!" containers: main: