mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 17:52:13 +08:00
Publish new changes in catalog
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.1
|
||||
version: 1.0.2
|
||||
apiVersion: v2
|
||||
appVersion: palworld
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
@@ -11,3 +11,10 @@ palworldStorage:
|
||||
type: pvc
|
||||
server:
|
||||
type: pvc
|
||||
|
||||
palworldConfig:
|
||||
adminPassword: sec!@#%-_ret123@#%-_!@#%
|
||||
backup:
|
||||
enabled: true
|
||||
interval: 60
|
||||
keep: 3
|
||||
@@ -10,6 +10,14 @@ resources:
|
||||
|
||||
palworldConfig:
|
||||
adminPassword: ''
|
||||
server:
|
||||
name: TrueNAS Palworld Server
|
||||
description: Palworld Server running on TrueNAS
|
||||
password: ''
|
||||
backup:
|
||||
enabled: false
|
||||
interval: 60
|
||||
keep: 3
|
||||
gameParams:
|
||||
- EpicApp=PalServer
|
||||
gameParamsExtra:
|
||||
@@ -23,7 +23,72 @@ questions:
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
required: true
|
||||
default: ""
|
||||
valid_chars: "[a-zA-Z0-9!@#%-_]*"
|
||||
valid_chars_error: |
|
||||
Can contain at numbers, letters, and the following characters: !@#%-_
|
||||
- variable: server
|
||||
label: Server Configuration
|
||||
description: Configure the server for Palworld
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Server Name
|
||||
description: Your server name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: "TrueNAS Palworld Server"
|
||||
- variable: description
|
||||
label: Server Description
|
||||
description: Your server description
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: "Palworld Server running on TrueNAS"
|
||||
- variable: password
|
||||
label: Server Password
|
||||
description: |
|
||||
Your server password, leave blank for no password
|
||||
schema:
|
||||
type: string
|
||||
private: true
|
||||
default: ""
|
||||
valid_chars: "[a-zA-Z0-9!@#%-_]*"
|
||||
valid_chars_error: |
|
||||
Can contain at numbers, letters, and the following characters: !@#%-_
|
||||
- variable: backup
|
||||
label: Backup
|
||||
description: Configure the backup for Palworld
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: enabled
|
||||
label: Enabled
|
||||
description: Enable the backup for Palworld
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: interval
|
||||
label: Interval
|
||||
description: Interval in minutes to backup the server
|
||||
schema:
|
||||
type: int
|
||||
show_if: [["enabled", "=", true]]
|
||||
default: 120
|
||||
required: true
|
||||
min: 15
|
||||
- variable: keep
|
||||
label: Keep
|
||||
description: How many backups to keep
|
||||
schema:
|
||||
type: int
|
||||
show_if: [["enabled", "=", true]]
|
||||
default: 3
|
||||
required: true
|
||||
min: 1
|
||||
- variable: gameParams
|
||||
label: Game Parameters
|
||||
description: |
|
||||
@@ -31,6 +31,10 @@ workload:
|
||||
STEAMCMD_DIR: /serverdata/steamcmd
|
||||
{{- $srvDir := "/serverdata/serverfiles" }}
|
||||
SERVER_DIR: {{ $srvDir }}
|
||||
# This var does not seem to be used from the container script
|
||||
# But is documented in the README, we currently update the password
|
||||
# with the initContainer, keeping this here to avoid inconsistencies
|
||||
# in case the container script is updated
|
||||
SRV_ADMIN_PWD: {{ .Values.palworldConfig.adminPassword }}
|
||||
GAME_PARAMS: {{ join " " .Values.palworldConfig.gameParams }}
|
||||
GAME_PARAMS_EXTRA: {{ join " " .Values.palworldConfig.gameParamsExtra }}
|
||||
@@ -38,6 +42,9 @@ workload:
|
||||
VALIDATE: {{ .Values.palworldConfig.validate }}
|
||||
USERNAME: {{ .Values.palworldConfig.username }}
|
||||
PASSWORD: {{ .Values.palworldConfig.password }}
|
||||
BACKUP: {{ .Values.palworldConfig.backup.enabled | default false }}
|
||||
BACKUP_INTERVAL: {{ .Values.palworldConfig.backup.interval | default 120 }}
|
||||
BACKUPS_TO_KEEP: {{ .Values.palworldConfig.backup.keep | default 3 }}
|
||||
fixedEnv:
|
||||
PUID: {{ .Values.palworldID.user }}
|
||||
{{ with .Values.palworldConfig.additionalEnvs }}
|
||||
@@ -96,5 +103,17 @@ workload:
|
||||
echo "Setting Game Port..."
|
||||
sed -i 's/\(PublicPort=\)[^,]*/\1{{ .Values.palworldNetwork.serverPort }}/g' ${cfgFile}
|
||||
echo "Set to [$(grep -Po 'PublicPort=[^,]*' ${cfgFile})]"
|
||||
echo "Setting Server Name..."
|
||||
sed -i 's/\(ServerName=\)[^,]*/\1{{ .Values.palworldConfig.server.name | quote }}/g' ${cfgFile}
|
||||
echo "Set to [$(grep -Po 'ServerName=[^,]*' ${cfgFile})]"
|
||||
echo "Setting Server Description..."
|
||||
sed -i 's/\(ServerDescription=\)[^,]*/\1{{ .Values.palworldConfig.server.description | quote }}/g' ${cfgFile}
|
||||
echo "Set to [$(grep -Po 'ServerDescription=[^,]*' ${cfgFile})]"
|
||||
echo "Setting Server Password..."
|
||||
sed -i 's/\(ServerPassword=\)[^,]*/\1{{ .Values.palworldConfig.server.password | quote }}/g' ${cfgFile}
|
||||
echo "Server Password set..."
|
||||
echo "Setting Admin Password..."
|
||||
sed -i 's/\(AdminPassword=\)[^,]*/\1{{ .Values.palworldConfig.adminPassword | quote }}/g' ${cfgFile}
|
||||
echo "Admin Password set..."
|
||||
echo "Done!"
|
||||
{{- end -}}
|
||||
@@ -7,4 +7,12 @@
|
||||
|
||||
{{- $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 -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user