Browse Source

Publish new changes in catalog

sonicaj 1 year ago
parent
commit
99583987ff

+ 0 - 0
community/palworld/1.0.1/Chart.lock → community/palworld/1.0.2/Chart.lock


+ 1 - 1
community/palworld/1.0.1/Chart.yaml → 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'

+ 0 - 0
community/palworld/1.0.1/README.md → community/palworld/1.0.2/README.md


+ 0 - 0
community/palworld/1.0.1/app-readme.md → community/palworld/1.0.2/app-readme.md


+ 0 - 0
community/palworld/1.0.1/charts/common-1.2.9.tgz → community/palworld/1.0.2/charts/common-1.2.9.tgz


+ 7 - 0
community/palworld/1.0.1/ci/basic-values.yaml → 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

+ 8 - 0
community/palworld/1.0.1/ix_values.yaml → 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:

+ 0 - 0
community/palworld/1.0.1/metadata.yaml → community/palworld/1.0.2/metadata.yaml


+ 65 - 0
community/palworld/1.0.1/questions.yaml → 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: |

+ 0 - 0
community/palworld/1.0.1/templates/NOTES.txt → community/palworld/1.0.2/templates/NOTES.txt


+ 19 - 0
community/palworld/1.0.1/templates/_palworld.tpl → 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 -}}

+ 8 - 0
community/palworld/1.0.1/templates/_params.tpl → 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 -}}

+ 0 - 0
community/palworld/1.0.1/templates/_persistence.tpl → community/palworld/1.0.2/templates/_persistence.tpl


+ 0 - 0
community/palworld/1.0.1/templates/_service.tpl → community/palworld/1.0.2/templates/_service.tpl


+ 0 - 0
community/palworld/1.0.1/templates/common.yaml → community/palworld/1.0.2/templates/common.yaml


+ 0 - 0
community/palworld/1.0.1/upgrade_strategy_disabled → community/palworld/1.0.2/upgrade_strategy_disabled