mirror of
https://github.com/truenas/charts.git
synced 2026-05-03 13:52:50 +08:00
* 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>
30 lines
1.1 KiB
Smarty
30 lines
1.1 KiB
Smarty
{{- define "palworld.set.params" -}}
|
|
{{- range $param := .Values.palworldConfig.gameParams -}}
|
|
{{- if hasPrefix "port=" $param -}}
|
|
{{- fail "PalWorld - [port=] param is automatically adjusted from the Server Port field" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- $params := (prepend .Values.palworldConfig.gameParams (printf "port=%v" .Values.palworldNetwork.serverPort)) -}}
|
|
{{- $_ := set .Values.palworldConfig "gameParams" $params -}}
|
|
|
|
{{/* Handle upgrades from versions that did not had such dicts */}}
|
|
{{- if not .Values.palworldConfig.server -}}
|
|
{{- $_ := set .Values.palworldConfig "server" dict -}}
|
|
{{- end -}}
|
|
{{- if not .Values.palworldConfig.backup -}}
|
|
{{- $_ := set .Values.palworldConfig "backup" dict -}}
|
|
{{- end -}}
|
|
|
|
{{- $reservedKeys := list
|
|
"RCONEnabled" "RCONPort" "PublicPort" "ServerName"
|
|
"ServerDescription" "ServerPassword" "AdminPassword" "AllowConnectPlatform"
|
|
-}}
|
|
|
|
{{- range $item := .Values.palworldConfig.iniKeys }}
|
|
{{- if (mustHas $item.key $reservedKeys) -}}
|
|
{{- fail (printf "PalWorld - [%v] is a reserved key." $item.key) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|