Publish new changes in catalog

This commit is contained in:
sonicaj
2024-09-12 13:50:21 +00:00
parent 4b041e1d8a
commit 2a9b485027
16 changed files with 25 additions and 3 deletions

View File

@@ -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'

View File

@@ -14,6 +14,7 @@ palworldConfig:
name: TrueNAS Palworld Server
description: Palworld Server running on TrueNAS
password: ''
allowPlatform: Steam
backup:
enabled: false
interval: 60

View File

@@ -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: |

View File

@@ -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 -}}

View File

@@ -18,7 +18,7 @@
{{- $reservedKeys := list
"RCONEnabled" "RCONPort" "PublicPort" "ServerName"
"ServerDescription" "ServerPassword" "AdminPassword"
"ServerDescription" "ServerPassword" "AdminPassword" "AllowConnectPlatform"
-}}
{{- range $item := .Values.palworldConfig.iniKeys }}