mirror of
https://github.com/truenas/charts.git
synced 2026-06-14 22:25:57 +08:00
Added Platform support to PalWorld Chart (#2795)
* Changes to chnage platforms * Changes to change platforms * Update library/ix-dev/community/palworld/questions.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update library/ix-dev/community/palworld/questions.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update library/ix-dev/community/palworld/templates/_palworld.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update library/ix-dev/community/palworld/values.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --------- Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ description: Palworld is a multiplayer, open-world survival crafting game where
|
||||
annotations:
|
||||
title: Palworld
|
||||
type: application
|
||||
version: 1.0.4
|
||||
version: 1.0.5
|
||||
apiVersion: v2
|
||||
appVersion: palworld
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -53,6 +53,17 @@ questions:
|
||||
type: string
|
||||
private: true
|
||||
default: ""
|
||||
- variable: allowPlatform
|
||||
label: Platform
|
||||
description: Specify which platforms are allowed to connect
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
enum:
|
||||
- value: "Steam"
|
||||
description: Steam platform
|
||||
- value: "Xbox"
|
||||
description: Xbox platform
|
||||
- variable: iniKeys
|
||||
label: Configure INI Keys
|
||||
description: |
|
||||
|
||||
@@ -110,7 +110,16 @@ workload:
|
||||
fi
|
||||
|
||||
echo "Setting ${key}..."
|
||||
sed -i "s|\(${key}=\)[^,]*|\1${escaped_value}|g" "${cfgFile}"
|
||||
|
||||
# Check if the key already exists
|
||||
if grep -q "^OptionSettings=\(.*${key}=.*\)$" "${cfgFile}"; then
|
||||
# Key exists, update its value using the original logic
|
||||
sed -i "s|\(${key}=\)[^,]*|\1${escaped_value}|g" "${cfgFile}"
|
||||
else
|
||||
# Key doesn't exist, append it right after "OptionSettings=("
|
||||
sed -i "s|^\(OptionSettings=(\)|\1${key}=${escaped_value}, |" "${cfgFile}"
|
||||
fi
|
||||
|
||||
if [ "$print" = true ]; then
|
||||
echo "Set to $(grep -Po "(?<=${key}=)[^,]*" "${cfgFile}")"
|
||||
fi
|
||||
@@ -123,6 +132,7 @@ workload:
|
||||
set_ini_value "ServerDescription" {{ .Values.palworldConfig.server.description | quote }} true
|
||||
set_ini_value "ServerPassword" {{ .Values.palworldConfig.server.password | squote }} true false
|
||||
set_ini_value "AdminPassword" {{ .Values.palworldConfig.adminPassword | squote }} true false
|
||||
set_ini_value "AllowConnectPlatform" {{ .Values.palworldConfig.allowPlatform }} false
|
||||
|
||||
{{- range $item := .Values.palworldConfig.iniKeys }}
|
||||
{{- $k := $item.key -}}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
{{- $reservedKeys := list
|
||||
"RCONEnabled" "RCONPort" "PublicPort" "ServerName"
|
||||
"ServerDescription" "ServerPassword" "AdminPassword"
|
||||
"ServerDescription" "ServerPassword" "AdminPassword" "AllowConnectPlatform"
|
||||
-}}
|
||||
|
||||
{{- range $item := .Values.palworldConfig.iniKeys }}
|
||||
|
||||
@@ -14,6 +14,7 @@ palworldConfig:
|
||||
name: TrueNAS Palworld Server
|
||||
description: Palworld Server running on TrueNAS
|
||||
password: ''
|
||||
allowPlatform: Steam
|
||||
backup:
|
||||
enabled: false
|
||||
interval: 60
|
||||
|
||||
Reference in New Issue
Block a user