From 99583987ff21d39cef95f94bca54fb88191f3ef6 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Fri, 26 Jan 2024 07:52:56 +0000 Subject: [PATCH] Publish new changes in catalog --- .../palworld/{1.0.1 => 1.0.2}/Chart.lock | 0 .../palworld/{1.0.1 => 1.0.2}/Chart.yaml | 2 +- community/palworld/{1.0.1 => 1.0.2}/README.md | 0 .../palworld/{1.0.1 => 1.0.2}/app-readme.md | 0 .../{1.0.1 => 1.0.2}/charts/common-1.2.9.tgz | Bin .../{1.0.1 => 1.0.2}/ci/basic-values.yaml | 7 ++ .../palworld/{1.0.1 => 1.0.2}/ix_values.yaml | 8 +++ .../palworld/{1.0.1 => 1.0.2}/metadata.yaml | 0 .../palworld/{1.0.1 => 1.0.2}/questions.yaml | 65 ++++++++++++++++++ .../{1.0.1 => 1.0.2}/templates/NOTES.txt | 0 .../{1.0.1 => 1.0.2}/templates/_palworld.tpl | 19 +++++ .../{1.0.1 => 1.0.2}/templates/_params.tpl | 8 +++ .../templates/_persistence.tpl | 0 .../{1.0.1 => 1.0.2}/templates/_service.tpl | 0 .../{1.0.1 => 1.0.2}/templates/common.yaml | 0 .../upgrade_strategy_disabled | 0 16 files changed, 108 insertions(+), 1 deletion(-) rename community/palworld/{1.0.1 => 1.0.2}/Chart.lock (100%) rename community/palworld/{1.0.1 => 1.0.2}/Chart.yaml (98%) rename community/palworld/{1.0.1 => 1.0.2}/README.md (100%) rename community/palworld/{1.0.1 => 1.0.2}/app-readme.md (100%) rename community/palworld/{1.0.1 => 1.0.2}/charts/common-1.2.9.tgz (100%) rename community/palworld/{1.0.1 => 1.0.2}/ci/basic-values.yaml (58%) rename community/palworld/{1.0.1 => 1.0.2}/ix_values.yaml (80%) rename community/palworld/{1.0.1 => 1.0.2}/metadata.yaml (100%) rename community/palworld/{1.0.1 => 1.0.2}/questions.yaml (89%) rename community/palworld/{1.0.1 => 1.0.2}/templates/NOTES.txt (100%) rename community/palworld/{1.0.1 => 1.0.2}/templates/_palworld.tpl (72%) rename community/palworld/{1.0.1 => 1.0.2}/templates/_params.tpl (59%) rename community/palworld/{1.0.1 => 1.0.2}/templates/_persistence.tpl (100%) rename community/palworld/{1.0.1 => 1.0.2}/templates/_service.tpl (100%) rename community/palworld/{1.0.1 => 1.0.2}/templates/common.yaml (100%) rename community/palworld/{1.0.1 => 1.0.2}/upgrade_strategy_disabled (100%) diff --git a/community/palworld/1.0.1/Chart.lock b/community/palworld/1.0.2/Chart.lock similarity index 100% rename from community/palworld/1.0.1/Chart.lock rename to community/palworld/1.0.2/Chart.lock diff --git a/community/palworld/1.0.1/Chart.yaml b/community/palworld/1.0.2/Chart.yaml similarity index 98% rename from community/palworld/1.0.1/Chart.yaml rename to community/palworld/1.0.2/Chart.yaml index e032e70d2d..2650f3eb8c 100644 --- a/community/palworld/1.0.1/Chart.yaml +++ b/community/palworld/1.0.2/Chart.yaml @@ -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' diff --git a/community/palworld/1.0.1/README.md b/community/palworld/1.0.2/README.md similarity index 100% rename from community/palworld/1.0.1/README.md rename to community/palworld/1.0.2/README.md diff --git a/community/palworld/1.0.1/app-readme.md b/community/palworld/1.0.2/app-readme.md similarity index 100% rename from community/palworld/1.0.1/app-readme.md rename to community/palworld/1.0.2/app-readme.md diff --git a/community/palworld/1.0.1/charts/common-1.2.9.tgz b/community/palworld/1.0.2/charts/common-1.2.9.tgz similarity index 100% rename from community/palworld/1.0.1/charts/common-1.2.9.tgz rename to community/palworld/1.0.2/charts/common-1.2.9.tgz diff --git a/community/palworld/1.0.1/ci/basic-values.yaml b/community/palworld/1.0.2/ci/basic-values.yaml similarity index 58% rename from community/palworld/1.0.1/ci/basic-values.yaml rename to community/palworld/1.0.2/ci/basic-values.yaml index 0dbdbf2250..f1c0dc6193 100644 --- a/community/palworld/1.0.1/ci/basic-values.yaml +++ b/community/palworld/1.0.2/ci/basic-values.yaml @@ -11,3 +11,10 @@ palworldStorage: type: pvc server: type: pvc + +palworldConfig: + adminPassword: sec!@#%-_ret123@#%-_!@#% + backup: + enabled: true + interval: 60 + keep: 3 diff --git a/community/palworld/1.0.1/ix_values.yaml b/community/palworld/1.0.2/ix_values.yaml similarity index 80% rename from community/palworld/1.0.1/ix_values.yaml rename to community/palworld/1.0.2/ix_values.yaml index 2729143ce3..9c199faeee 100644 --- a/community/palworld/1.0.1/ix_values.yaml +++ b/community/palworld/1.0.2/ix_values.yaml @@ -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: diff --git a/community/palworld/1.0.1/metadata.yaml b/community/palworld/1.0.2/metadata.yaml similarity index 100% rename from community/palworld/1.0.1/metadata.yaml rename to community/palworld/1.0.2/metadata.yaml diff --git a/community/palworld/1.0.1/questions.yaml b/community/palworld/1.0.2/questions.yaml similarity index 89% rename from community/palworld/1.0.1/questions.yaml rename to community/palworld/1.0.2/questions.yaml index ddbc0f0028..23b2931e78 100644 --- a/community/palworld/1.0.1/questions.yaml +++ b/community/palworld/1.0.2/questions.yaml @@ -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: | diff --git a/community/palworld/1.0.1/templates/NOTES.txt b/community/palworld/1.0.2/templates/NOTES.txt similarity index 100% rename from community/palworld/1.0.1/templates/NOTES.txt rename to community/palworld/1.0.2/templates/NOTES.txt diff --git a/community/palworld/1.0.1/templates/_palworld.tpl b/community/palworld/1.0.2/templates/_palworld.tpl similarity index 72% rename from community/palworld/1.0.1/templates/_palworld.tpl rename to community/palworld/1.0.2/templates/_palworld.tpl index 6ed3a7a76b..f8b286845d 100644 --- a/community/palworld/1.0.1/templates/_palworld.tpl +++ b/community/palworld/1.0.2/templates/_palworld.tpl @@ -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 -}} diff --git a/community/palworld/1.0.1/templates/_params.tpl b/community/palworld/1.0.2/templates/_params.tpl similarity index 59% rename from community/palworld/1.0.1/templates/_params.tpl rename to community/palworld/1.0.2/templates/_params.tpl index 29df6ba840..95de5bd598 100644 --- a/community/palworld/1.0.1/templates/_params.tpl +++ b/community/palworld/1.0.2/templates/_params.tpl @@ -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 -}} diff --git a/community/palworld/1.0.1/templates/_persistence.tpl b/community/palworld/1.0.2/templates/_persistence.tpl similarity index 100% rename from community/palworld/1.0.1/templates/_persistence.tpl rename to community/palworld/1.0.2/templates/_persistence.tpl diff --git a/community/palworld/1.0.1/templates/_service.tpl b/community/palworld/1.0.2/templates/_service.tpl similarity index 100% rename from community/palworld/1.0.1/templates/_service.tpl rename to community/palworld/1.0.2/templates/_service.tpl diff --git a/community/palworld/1.0.1/templates/common.yaml b/community/palworld/1.0.2/templates/common.yaml similarity index 100% rename from community/palworld/1.0.1/templates/common.yaml rename to community/palworld/1.0.2/templates/common.yaml diff --git a/community/palworld/1.0.1/upgrade_strategy_disabled b/community/palworld/1.0.2/upgrade_strategy_disabled similarity index 100% rename from community/palworld/1.0.1/upgrade_strategy_disabled rename to community/palworld/1.0.2/upgrade_strategy_disabled