Merge branch 'main' into cron-backup

This commit is contained in:
Carlos M. Martinez
2024-01-28 17:37:40 -05:00
14 changed files with 491 additions and 361 deletions

View File

@@ -4,7 +4,9 @@ on:
types: [published] types: [published]
jobs: jobs:
# Builds the Dockerfile and pushes it to dockerhub
release: release:
name: Release - Docker image
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@@ -34,3 +36,35 @@ jobs:
with: with:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
# Generates a new release specifically for the helm chart, using the helm charts version
# Only generates a new release if the helm charts version has changed since the last release
# Will then update the gh-pages branch & helm repository
release-helm:
name: Release - Helm chart
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git - Configure
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# Will push updates to a index.yaml file in the gh-pages branch
- name: Helm - chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: charts
pages_branch: gh-pages
mark_as_latest: false
skip_existing: true
config: ./charts/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

4
.gitignore vendored
View File

@@ -1,4 +1,4 @@
palworld palworld
.idea .idea
values*.yaml !charts/*
!chart/values.yaml values*.yaml

View File

@@ -48,6 +48,7 @@ services:
image: thijsvanloef/palworld-server-docker:latest image: thijsvanloef/palworld-server-docker:latest
restart: unless-stopped restart: unless-stopped
container_name: palworld-server container_name: palworld-server
stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
ports: ports:
- 8211:8211/udp - 8211:8211/udp
- 27015:27015/udp - 27015:27015/udp
@@ -97,6 +98,10 @@ docker run -d \
``` ```
> [!TIP]
> If you want to stop the container with a custom stop grace period then run:
> `docker stop --name palworld-server --time 30`
### Kubernetes ### Kubernetes
All files you will need to deploy this container to kubernetes are located in the [k8s folder](k8s/). All files you will need to deploy this container to kubernetes are located in the [k8s folder](k8s/).
@@ -105,7 +110,7 @@ Follow the steps in the [README.md here](k8s/readme.md) to deploy it.
#### Using helm chart #### Using helm chart
Follow up the docs on the [README.md for the helm chart](./chart/README.md) to deploy. Follow up the docs on the [README.md for the helm chart](./charts/palworld/README.md) to deploy.
### Environment variables ### Environment variables
@@ -297,12 +302,12 @@ BACKUP_ENABLED=true
When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`
Any changes made while the server is live will be overridden.
Please keep in mind that the ENV variables will always overwrite the changes made to `PalWorldSettings.ini`. Please keep in mind that the ENV variables will always overwrite the changes made to `PalWorldSettings.ini`.
> [!IMPORTANT] > [!IMPORTANT]
> Changes can only be made to `PalWorldSettings.ini` while the server is off. > Changes can only be made to `PalWorldSettings.ini` while the server is off.
>
> Any changes made while the server is live will be overwritten when the server stops.
For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html)

1
charts/cr.yaml Normal file
View File

@@ -0,0 +1 @@
release-name-template: "chart-{{ .Version }}"

View File

@@ -1,20 +1,20 @@
apiVersion: v2 apiVersion: v2
name: palworld name: palworld
version: 0.0.1 version: 0.0.2
description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. description: This chart will provide a Palworld server installation on a kubernetes cluster.
type: application type: application
keywords: keywords:
- palworld - palworld
- server - server
- kubernetes - kubernetes
- helm - helm
home: https://github.com/thijsvanloef/palworld-server-docker home: https://github.com/thijsvanloef/palworld-server-docker
sources: sources:
- https://github.com/thijsvanloef/palworld-server-docker - https://github.com/thijsvanloef/palworld-server-docker
maintainers: maintainers:
- name: Filipe Souza - name: Filipe Souza
email: filipe.souza@mestre8d.com email: filipe.souza@mestre8d.com
url: https://github.com/Filipe-Souza url: https://github.com/Filipe-Souza
icon: https://cdn.akamai.steamstatic.com/steam/apps/1623730/header.jpg icon: https://cdn.akamai.steamstatic.com/steam/apps/1623730/header.jpg
appVersion: "latest" appVersion: "latest"
deprecated: false deprecated: false

View File

@@ -1,10 +1,10 @@
# palworld # palworld
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational) ![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational)
![Type: application](https://img.shields.io/badge/Type-application-informational) ![Type: application](https://img.shields.io/badge/Type-application-informational)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational)
This chart can provide an rAthena emulator installation on a Kubernetes cluster. This chart will provide a Palworld server installation on a kubernetes cluster.
**Homepage:** <https://github.com/thijsvanloef/palworld-server-docker> **Homepage:** <https://github.com/thijsvanloef/palworld-server-docker>
@@ -32,11 +32,17 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster.
| server.config.labels | object | `{}` | Additional labels to the resources | | server.config.labels | object | `{}` | Additional labels to the resources |
| server.config.max_players | int | `16` | The max number of players supported. | | server.config.max_players | int | `16` | The max number of players supported. |
| server.config.multithreading | bool | `true` | Enables the multithreading, allowing the usage of up to 4 cores (needs citation) | | server.config.multithreading | bool | `true` | Enables the multithreading, allowing the usage of up to 4 cores (needs citation) |
| server.config.public_ip | string | `""` | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. |
| server.config.public_port | string | `""` | You can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. |
| server.config.query_port | string | `27015` | The query port of the game. | | server.config.query_port | string | `27015` | The query port of the game. |
| server.config.rcon | dict | | Remote connection configuration. Allows the remote connection and management for the server. Those are directly connected with the container image, providing multiple environment variables to the scripts. | | server.config.rcon | dict | | Remote connection configuration. Allows the remote connection and management for the server. Those are directly connected with the container image, providing multiple environment variables to the scripts. |
| server.config.rcon.enable | bool | `true` | Enables/disables the rcon port. | | server.config.rcon.enable | bool | `true` | Enables/disables the rcon port. |
| server.config.rcon.password | string | `""` | If not provided, a random password will be generated and stored on the secret. | | server.config.rcon.password | string | `""` | If not provided, a random password will be generated and stored on the secret. |
| server.config.rcon.port | string | `25575` | The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. | | server.config.rcon.port | string | `25575` | The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. |
| server.config.server_description | string | `""` | Your server description to be shown in game |
| server.config.timezone | string | `"UTC"` | The timezone used for time stamping backup server. Use the IANA TZ format with Area/Location See the [list of TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) |
| server.config.update_on_boot | string | `true` | Update/Install the server when the container starts. THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER |
| server.config.world_parameters | object | | Configures the game world settings. The key:values here should represent in game accepted values. Wrap all values with quotes here to avoid validation issues. |
| server.image | dict | | Define the parameters for the server image container | | server.image | dict | | Define the parameters for the server image container |
| server.image.imagePullPolicy | string | `"IfNotPresent"` | Define the pull policy for the server image. | | server.image.imagePullPolicy | string | `"IfNotPresent"` | Define the pull policy for the server image. |
| server.image.name | string | `"thijsvanloef/palworld-server-docker"` | Name of the image, without the tag. | | server.image.name | string | `"thijsvanloef/palworld-server-docker"` | Name of the image, without the tag. |
@@ -63,6 +69,7 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster.
| server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. | | server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. |
| server.storage.size | string | `"12Gi"` | The size of the pvc storage. | | server.storage.size | string | `"12Gi"` | The size of the pvc storage. |
| server.storage.storageClassName | string | `""` | The storage class name. | | server.storage.storageClassName | string | `""` | The storage class name. |
| server.strategy | string | `"Recreate"` | Change the deployment strategy |
---------------------------------------------- ----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)

View File

@@ -1,40 +1,51 @@
{{- $cPwd := randAlphaNum 12 | nospace -}} {{- $cPwd := randAlphaNum 12 | nospace -}}
{{- $sName := "" -}} {{- $sName := "" -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
name: "{{ .Release.Name }}-env-config" name: "{{ .Release.Name }}-env-config"
annotations: annotations:
{{- with .Values.server.config.annotations }} {{- with .Values.server.config.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
labels: labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: "{{ .Release.Name }}-config" app.kubernetes.io/name: "{{ .Release.Name }}-config"
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "{{ .Release.Name }}-config" app.kubernetes.io/component: "{{ .Release.Name }}-config"
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- with .Values.server.config.labels }} {{- with .Values.server.config.labels }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
data: data:
PUID: "{{ .Values.server.config.puid }}" PUID: "{{ .Values.server.config.puid }}"
PGID: "{{ .Values.server.config.pgid }}" PGID: "{{ .Values.server.config.pgid }}"
PORT: "{{ .Values.server.config.port }}" PORT: "{{ .Values.server.config.port }}"
PLAYERS: "{{ .Values.server.config.max_players }}" PLAYERS: "{{ .Values.server.config.max_players }}"
MULTITHREADING: "{{ .Values.server.config.multithreading }}" MULTITHREADING: "{{ .Values.server.config.multithreading }}"
{{ if .Values.server.config.rcon.enable }} {{ if .Values.server.config.rcon.enable }}
RCON_ENABLED: "true" RCON_ENABLED: "true"
RCON_PORT: "{{ .Values.server.config.rcon.port }}" RCON_PORT: "{{ .Values.server.config.rcon.port }}"
{{ end }} {{ end }}
{{ if .Values.server.config.community.enable }} {{ if .Values.server.config.community.enable }}
COMMUNITY: "true" COMMUNITY: "true"
SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }} SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }}
{{ end }} {{ end }}
{{ if .Values.server.config.server_name }} {{ if .Values.server.config.server_name }}
SERVER_NAME: {{ regexReplaceAll "\\W+" .Values.server.config.server_name "_" }} SERVER_NAME: {{ regexReplaceAll "\\W+" .Values.server.config.server_name "_" }}
{{ else }} {{ else }}
SERVER_NAME: {{ printf "%s_%s" "palworld" (randAlphaNum 6 | nospace) }} SERVER_NAME: {{ printf "%s_%s" "palworld" (randAlphaNum 6 | nospace) }}
{{ end }}
TZ: {{ .Values.server.config.timezone }}
PUBLIC_IP: {{ .Values.server.config.public_ip | quote }}
PUBLIC_PORT: {{ .Values.server.config.public_port | quote }}
SERVER_DESCRIPTION: {{ .Values.server.config.server_description }}
UPDATE_ON_BOOT: {{ .Values.server.config.update_on_boot | quote }}
QUERY_PORT: {{ .Values.server.config.query_port | quote }}
{{ if .Values.server.config.world_parameters }}
{{- with .Values.server.config.world_parameters }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{ end }} {{ end }}

View File

@@ -1,70 +1,70 @@
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
name: "{{ .Release.Name }}-server" name: "{{ .Release.Name }}-server"
spec: spec:
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/component: "{{ .Release.Name }}-server" app.kubernetes.io/component: "{{ .Release.Name }}-server"
strategy: strategy:
type: "{{ .Values.server.strategy }}" type: "{{ .Values.server.strategy }}"
template: template:
metadata: metadata:
annotations: annotations:
{{- with .Values.server.annotations }} {{- with .Values.server.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
labels: labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: "{{ .Release.Name }}-server" app.kubernetes.io/name: "{{ .Release.Name }}-server"
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "{{ .Release.Name }}-server" app.kubernetes.io/component: "{{ .Release.Name }}-server"
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- with .Values.server.labels }} {{- with .Values.server.labels }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
containers: containers:
{{ if .Values.server.service.healthz.enabled }} {{ if .Values.server.service.healthz.enabled }}
- name: healthz - name: healthz
image: "chussenot/tiny-server:latest" image: "chussenot/tiny-server:latest"
imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} imagePullPolicy: {{ .Values.server.image.imagePullPolicy }}
ports: ports:
- name: healthz - name: healthz
containerPort: 80 containerPort: 80
protocol: TCP protocol: TCP
{{ end }} {{ end }}
- name: server - name: server
image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}"
imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} imagePullPolicy: {{ .Values.server.image.imagePullPolicy }}
resources: resources:
{{- with .Values.server.resources }} {{- with .Values.server.resources }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
ports: ports:
{{- with .Values.server.ports }} {{- with .Values.server.ports }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
env: env:
- name: ADMIN_PASSWORD - name: ADMIN_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: "{{ .Release.Name }}-rcon-password" name: "{{ .Release.Name }}-rcon-password"
key: "rconPassword" key: "rconPassword"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: "{{ .Release.Name }}-env-config" name: "{{ .Release.Name }}-env-config"
volumeMounts: volumeMounts:
- mountPath: /palworld - mountPath: /palworld
name: datadir name: datadir
volumes: volumes:
- name: datadir - name: datadir
persistentVolumeClaim: persistentVolumeClaim:
{{- if not .Values.server.storage.external }} {{- if not .Values.server.storage.external }}
claimName: "{{ .Release.Name }}-datadir-pvc" claimName: "{{ .Release.Name }}-datadir-pvc"
{{ else }} {{ else }}
claimName: "{{ .Values.server.storage.externalName }}" claimName: "{{ .Values.server.storage.externalName }}"
{{ end }} {{ end }}

View File

@@ -1,31 +1,31 @@
{{- if not .Values.server.storage.external }} {{- if not .Values.server.storage.external }}
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
name: "{{ .Release.Name }}-datadir-pvc" name: "{{ .Release.Name }}-datadir-pvc"
annotations: annotations:
{{- with .Values.server.config.annotations }} {{- with .Values.server.config.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
labels: labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: "{{ .Release.Name }}-datadir-pvc" app.kubernetes.io/name: "{{ .Release.Name }}-datadir-pvc"
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "{{ .Release.Name }}-datadir-pvc" app.kubernetes.io/component: "{{ .Release.Name }}-datadir-pvc"
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- if .Values.server.storage.preventDelete }} {{- if .Values.server.storage.preventDelete }}
helm.sh/resource-policy: keep helm.sh/resource-policy: keep
{{ end }} {{ end }}
{{- with .Values.server.config.labels }} {{- with .Values.server.config.labels }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: {{ .Values.server.storage.size }} storage: {{ .Values.server.storage.size }}
storageClassName: {{ .Values.server.storage.storageClassName }} storageClassName: {{ .Values.server.storage.storageClassName }}
{{ end }} {{ end }}

View File

@@ -1,25 +1,25 @@
{{- define "server.rcon.password" -}} {{- define "server.rcon.password" -}}
{{- randAlphaNum 24 | nospace -}} {{- randAlphaNum 24 | nospace -}}
{{- end -}} {{- end -}}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
name: "{{ .Release.Name }}-rcon-password" name: "{{ .Release.Name }}-rcon-password"
annotations: annotations:
{{- with .Values.server.config.annotations }} {{- with .Values.server.config.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
labels: labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: "{{ .Release.Name }}-rcon-password" app.kubernetes.io/name: "{{ .Release.Name }}-rcon-password"
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "{{ .Release.Name }}-rcon-password" app.kubernetes.io/component: "{{ .Release.Name }}-rcon-password"
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- with .Values.server.config.labels }} {{- with .Values.server.config.labels }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
type: Opaque type: Opaque
stringData: stringData:
rconPassword: {{- if .Values.server.config.rcon.password }} "{{ .Values.server.config.rcon.password }}" {{ else }} "{{ include "server.rcon.password" .}}" {{ end }} rconPassword: {{- if .Values.server.config.rcon.password }} "{{ .Values.server.config.rcon.password }}" {{ else }} "{{ include "server.rcon.password" .}}" {{ end }}

View File

@@ -1,34 +1,34 @@
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
name: "{{ .Release.Name }}-svc" name: "{{ .Release.Name }}-svc"
labels: labels:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/name: "{{ .Release.Name }}-svc" app.kubernetes.io/name: "{{ .Release.Name }}-svc"
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "{{ .Release.Name }}-svc" app.kubernetes.io/component: "{{ .Release.Name }}-svc"
app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- with .Values.server.service.labels }} {{- with .Values.server.service.labels }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
annotations: annotations:
{{- with .Values.server.config.annotations }} {{- with .Values.server.service.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
selector: selector:
app.kubernetes.io/component: "{{ .Release.Name }}-server" app.kubernetes.io/component: "{{ .Release.Name }}-server"
ports: ports:
{{ if .Values.server.service.healthz.enabled }} {{ if .Values.server.service.healthz.enabled }}
- name: {{ .Values.server.service.healthz.name }} - name: {{ .Values.server.service.healthz.name }}
port: {{ .Values.server.service.healthz.port }} port: {{ .Values.server.service.healthz.port }}
protocol: {{ .Values.server.service.healthz.protocol }} protocol: {{ .Values.server.service.healthz.protocol }}
targetPort: {{ .Values.server.service.healthz.targetPort }} targetPort: {{ .Values.server.service.healthz.targetPort }}
{{ end }} {{ end }}
{{- with .Values.server.service.ports }} {{- with .Values.server.service.ports }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
type: {{ .Values.server.service.type }} type: {{ .Values.server.service.type }}

View File

@@ -1,139 +1,210 @@
# -- Namespace where the resources will be created # -- Namespace where the resources will be created
namespace: palworld namespace: palworld
# -- (dict) The server configuration # -- (dict) The server configuration
# @notationType -- bigValue # @notationType -- bigValue
server: server:
# -- Additional annotations to the resources # -- Additional annotations to the resources
annotations: { } annotations: { }
# -- Additional labels to the resources # -- Additional labels to the resources
labels: { } labels: { }
# -- (dict) Resources limits for the container. # -- (dict) Resources limits for the container.
resources: resources:
limits: limits:
cpu: 4 cpu: 4
memory: "12Gi" memory: "12Gi"
requests: requests:
cpu: 4 cpu: 4
memory: "8Gi" memory: "8Gi"
# -- (dict) Define some parameters for the storage volume # -- (dict) Define some parameters for the storage volume
storage: storage:
# -- (bool) Define if it will use an existing PVC containing the installation data. # -- (bool) Define if it will use an existing PVC containing the installation data.
external: false external: false
# -- (bool) The external PVC name to use. # -- (bool) The external PVC name to use.
externalName: "" externalName: ""
# -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs. # -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs.
preventDelete: false preventDelete: false
# -- The size of the pvc storage. # -- The size of the pvc storage.
size: 12Gi size: 12Gi
# -- The storage class name. # -- The storage class name.
storageClassName: "" storageClassName: ""
# -- (dict) Define the parameters for the server image container # -- (dict) Define the parameters for the server image container
# @notationType -- bigValue # @notationType -- bigValue
image: image:
# -- Name of the image, without the tag. # -- Name of the image, without the tag.
name: thijsvanloef/palworld-server-docker name: thijsvanloef/palworld-server-docker
# -- The tag of the image. # -- The tag of the image.
tag: latest tag: latest
# -- Define the pull policy for the server image. # -- Define the pull policy for the server image.
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# -- (dict) Change the ports to be mapped to the pod. # -- (dict) Change the ports to be mapped to the pod.
# If you change those, make sure to change the service.ports and server.config accordingly. # If you change those, make sure to change the service.ports and server.config accordingly.
# @notationType -- bigValue # @notationType -- bigValue
ports: ports:
# -- (dict) The "game" port definition. # -- (dict) The "game" port definition.
# If you change this, make sure to change the service.ports.game and server.config accordingly. # If you change this, make sure to change the service.ports.game and server.config accordingly.
- name: game - name: game
containerPort: 8211 containerPort: 8211
protocol: UDP protocol: UDP
# -- (dict) The "query" port definition . # -- (dict) The "query" port definition .
# If you change this, make sure to change the service.ports.query_port and server.config accordingly. # If you change this, make sure to change the service.ports.query_port and server.config accordingly.
- name: query - name: query
containerPort: 27015 containerPort: 27015
protocol: UDP protocol: UDP
# -- (dict) The "rcon" port definition . # -- (dict) The "rcon" port definition .
# If you change this, make sure to change the service.ports.rcon and server.config accordingly. # If you change this, make sure to change the service.ports.rcon and server.config accordingly.
- name: rcon - name: rcon
containerPort: 25575 containerPort: 25575
protocol: UDP protocol: UDP
# -- (string) Change the deployment strategy # -- (string) Change the deployment strategy
strategy: Recreate strategy: Recreate
# -- (dict) Change the service configuration. # -- (dict) Change the service configuration.
# If you change those, make sure to change the server.config and server.ports accordingly. # If you change those, make sure to change the server.config and server.ports accordingly.
# @notationType -- bigValue # @notationType -- bigValue
service: service:
# -- (bool) Enables the creation of the service component. # -- (bool) Enables the creation of the service component.
enabled: true enabled: true
# -- Additional annotations to the resources # -- Additional annotations to the resources
annotations: { } annotations: { }
# -- Additional labels to the resources # -- Additional labels to the resources
labels: { } labels: { }
# -- (string) The type of service to be created. # -- (string) The type of service to be created.
type: LoadBalancer type: LoadBalancer
# -- (dict) The "healthz" definition . # -- (dict) The "healthz" definition .
# Use if you need to create a TCP health check for load balancers on cloud services. # Use if you need to create a TCP health check for load balancers on cloud services.
healthz: healthz:
enabled: false enabled: false
name: healthz name: healthz
port: 80 port: 80
protocol: TCP protocol: TCP
targetPort: 80 targetPort: 80
# -- (dict) Change the ports to be mapped to the service. # -- (dict) Change the ports to be mapped to the service.
# If you change those, make sure to change the server.config and server.ports accordingly. # If you change those, make sure to change the server.config and server.ports accordingly.
# @notationType -- bigValue # @notationType -- bigValue
ports: ports:
# -- (dict) The "game" port definition. # -- (dict) The "game" port definition.
# If you change this, make sure to change the server.ports.game and server.config.port accordingly. # If you change this, make sure to change the server.ports.game and server.config.port accordingly.
- name: game - name: game
port: 8211 port: 8211
protocol: UDP protocol: UDP
targetPort: 8211 targetPort: 8211
# -- (dict) The "query" port definition . # -- (dict) The "query" port definition .
# If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. # If you change this, make sure to change the server.ports.query and server.config.query_port accordingly.
- name: query - name: query
port: 27015 port: 27015
protocol: UDP protocol: UDP
targetPort: 27015 targetPort: 27015
# -- (dict) The "rcon" port definition . # -- (dict) The "rcon" port definition .
# If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. # If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly.
- name: rcon - name: rcon
port: 25575 port: 25575
protocol: UDP protocol: UDP
targetPort: 25575 targetPort: 25575
# -- (dict) Change the game server configuration. # -- (dict) Change the game server configuration.
# If you change those, make sure to change the service.ports and server.ports accordingly. # If you change those, make sure to change the service.ports and server.ports accordingly.
# Those are directly connected with the container image, providing multiple environment variables to the scripts. # Those are directly connected with the container image, providing multiple environment variables to the scripts.
# @notationType -- bigValue # @notationType -- bigValue
config: config:
# -- Additional annotations to the resources # -- Additional annotations to the resources
annotations: { } annotations: { }
# -- Additional labels to the resources # -- Additional labels to the resources
labels: { } labels: { }
puid: 1000 puid: 1000
pgid: 1000 pgid: 1000
port: 8211 port: 8211
# -- (string) The query port of the game. # -- (string) The query port of the game.
query_port: 27015 query_port: 27015
# -- The max number of players supported. # -- The max number of players supported.
max_players: 16 max_players: 16
# -- (bool) Enables the multithreading, allowing the usage of up to 4 cores (needs citation) # -- (bool) Enables the multithreading, allowing the usage of up to 4 cores (needs citation)
multithreading: true multithreading: true
# -- (dict) Remote connection configuration. # -- (dict) Remote connection configuration.
# Allows the remote connection and management for the server. # Allows the remote connection and management for the server.
# Those are directly connected with the container image, providing multiple environment variables to the scripts. # Those are directly connected with the container image, providing multiple environment variables to the scripts.
# @notationType -- bigValue # @notationType -- bigValue
rcon: rcon:
# -- (bool) Enables/disables the rcon port. # -- (bool) Enables/disables the rcon port.
enable: true enable: true
# -- (string) The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. # -- (string) The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly.
port: 25575 port: 25575
# -- (string) If not provided, a random password will be generated and stored on the secret. # -- (string) If not provided, a random password will be generated and stored on the secret.
password: "" password: ""
community: community:
# -- (bool) Enables/disables the visibility of this server on Steam community servers list. # -- (bool) Enables/disables the visibility of this server on Steam community servers list.
enable: true enable: true
# -- (string) If not provided, a random password will be generated and stored on the secret. # -- (string) If not provided, a random password will be generated and stored on the secret.
password: "" password: ""
# -- (string) If not provided, a random server name will be generated with the "palworld_" prefix. # -- (string) If not provided, a random server name will be generated with the "palworld_" prefix.
server_name: "" server_name: ""
# -- (string) The timezone used for time stamping backup server. Use the IANA TZ format with Area/Location
# See the [list of TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations)
timezone: "UTC"
# -- (string) You can manually specify the global IP address of the network on which the server running.
# If not specified, it will be detected automatically. If it does not work well, try manual configuration.
public_ip: ""
# -- (string) You can manually specify the port number of the network on which the server running.
# If not specified, it will be detected automatically. If it does not work well, try manual configuration.
public_port: ""
# -- (string) Your server description to be shown in game
server_description: ""
# -- (string) Update/Install the server when the container starts.
# THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER
update_on_boot: true
# -- (object) Configures the game world settings.
# The key:values here should represent in game accepted values.
# Wrap all values with quotes here to avoid validation issues.
# @notationType -- bigValue
world_parameters:
DAYTIME_SPEEDRATE: "1.000000"
NIGHTTIME_SPEEDRATE: "1.000000"
EXP_RATE: "1.000000"
PAL_CAPTURE_RATE: "1.000000"
PAL_SPAWN_NUM_RATE: "1.000000"
PAL_DAMAGE_RATE_ATTACK: "1.000000"
PAL_DAMAGE_RATE_DEFENSE: "1.000000"
PLAYER_DAMAGE_RATE_ATTACK: "1.000000"
PLAYER_DAMAGE_RATE_DEFENSE: "1.000000"
PLAYER_STOMACH_DECREASE_RATE: "1.000000"
PLAYER_STAMINA_DECREASE_RATE: "1.000000"
PLAYER_AUTO_HP_REGEN_RATE: "1.000000"
PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP: "1.000000"
PAL_STOMACH_DECREASE_RATE: "1.000000"
PAL_STAMINA_DECREASE_RATE: "1.000000"
PAL_AUTO_HP_REGEN_RATE: "1.000000"
PAL_AUTO_HP_REGEN_RATE_IN_SLEEP: "1.000000"
BUILD_OBJECT_DAMAGE_RATE: "1.000000"
BUILD_OBJECT_DETERIORATION_DAMAGE_RATE: "1.000000"
COLLECTION_DROP_RATE: "1.000000"
COLLECTION_OBJECT_HP_RATE: "1.000000"
COLLECTION_OBJECT_RESPAWN_SPEED_RATE: "1.000000"
ENEMY_DROP_ITEM_RATE: "1.000000"
DEATH_PENALTY: "All"
ENABLE_PLAYER_TO_PLAYER_DAMAGE: "False"
ENABLE_FRIENDLY_FIRE: "False"
ENABLE_INVADER_ENEMY: "True"
ACTIVE_UNKO: "True"
ENABLE_AIM_ASSIST_PAD: "True"
ENABLE_AIM_ASSIST_KEYBOARD: "False"
DROP_ITEM_MAX_NUM: "3000"
DROP_ITEM_MAX_NUM_UNKO: "1000"
BASE_CAMP_MAX_NUM: "128"
BASE_CAMP_WORKER_MAXNUM: "15"
DROP_ITEM_ALIVE_MAX_HOURS: "1.000000"
AUTO_RESET_GUILD_NO_ONLINE_PLAYERS: "False"
AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS: "72.000000"
GUILD_PLAYER_MAX_NUM: "3"
PAL_EGG_DEFAULT_HATCHING_TIME: "72.000000"
WORK_SPEED_RATE: "1.000000"
IS_MULTIPLAY: "False"
IS_PVP: "False"
CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP: "False"
ENABLE_NON_LOGIN_PENALTY: "True"
ENABLE_FAST_TRAVEL: "True"
IS_START_LOCATION_SELECT_BY_MAP: "True"
EXIST_PLAYER_AFTER_LOGOUT: "False"
ENABLE_DEFENSE_OTHER_GUILD_PLAYER: "False"
COOP_PLAYER_MAX_NUM: "4"
REGION: ""
USEAUTH: "True"
BAN_LIST_URL: "https://api.palworldgame.com/api/banlist.txt"

View File

@@ -3,6 +3,7 @@ services:
image: thijsvanloef/palworld-server-docker:latest image: thijsvanloef/palworld-server-docker:latest
restart: unless-stopped restart: unless-stopped
container_name: palworld-server container_name: palworld-server
stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
ports: ports:
- 8211:8211/udp - 8211:8211/udp
- 27015:27015/udp # Required if you want your server to show up in the community servers tab - 27015:27015/udp # Required if you want your server to show up in the community servers tab