From aa7c1068bc0dcaff9ddce80d5b815fb9f96ed868 Mon Sep 17 00:00:00 2001 From: Twinki Date: Sun, 28 Jan 2024 10:15:17 -0500 Subject: [PATCH] Add helm chart-releaser # Motivations # Modifications --- .github/workflows/release.yml | 34 +++ .gitignore | 3 +- charts/cr.yaml | 1 + {chart => charts/palworld}/Chart.yaml | 38 +-- {chart => charts/palworld}/README.md | 0 {chart => charts/palworld}/VALUES_SUMMARY.md | 0 .../palworld}/templates/configmaps.yaml | 78 ++--- .../palworld}/templates/deployments.yaml | 140 ++++----- .../palworld}/templates/pvcs.yaml | 60 ++-- .../palworld}/templates/secrets.yaml | 48 +-- .../palworld}/templates/services.yaml | 66 ++--- {chart => charts/palworld}/values.yaml | 278 +++++++++--------- 12 files changed, 390 insertions(+), 356 deletions(-) create mode 100644 charts/cr.yaml rename {chart => charts/palworld}/Chart.yaml (96%) rename {chart => charts/palworld}/README.md (100%) rename {chart => charts/palworld}/VALUES_SUMMARY.md (100%) rename {chart => charts/palworld}/templates/configmaps.yaml (97%) rename {chart => charts/palworld}/templates/deployments.yaml (97%) rename {chart => charts/palworld}/templates/pvcs.yaml (97%) rename {chart => charts/palworld}/templates/secrets.yaml (97%) rename {chart => charts/palworld}/templates/services.yaml (97%) rename {chart => charts/palworld}/values.yaml (97%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df8c48f..965d403 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,9 @@ on: types: [published] jobs: + # Builds the Dockerfile and pushes it to dockerhub release: + name: Release - Docker image runs-on: ubuntu-latest steps: - name: Checkout @@ -34,3 +36,35 @@ jobs: with: push: true 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 }}" diff --git a/.gitignore b/.gitignore index 5cddfe9..036b533 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ palworld .idea -values*.yaml -!chart/values.yaml \ No newline at end of file +!charts/* \ No newline at end of file diff --git a/charts/cr.yaml b/charts/cr.yaml new file mode 100644 index 0000000..e3130a8 --- /dev/null +++ b/charts/cr.yaml @@ -0,0 +1 @@ +release-name-template: "chart-{{ .Version }}" diff --git a/chart/Chart.yaml b/charts/palworld/Chart.yaml similarity index 96% rename from chart/Chart.yaml rename to charts/palworld/Chart.yaml index da1408a..93aea06 100644 --- a/chart/Chart.yaml +++ b/charts/palworld/Chart.yaml @@ -1,20 +1,20 @@ -apiVersion: v2 -name: palworld -version: 0.0.1 -description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. -type: application -keywords: - - palworld - - server - - kubernetes - - helm -home: https://github.com/thijsvanloef/palworld-server-docker -sources: - - https://github.com/thijsvanloef/palworld-server-docker -maintainers: - - name: Filipe Souza - email: filipe.souza@mestre8d.com - url: https://github.com/Filipe-Souza -icon: https://cdn.akamai.steamstatic.com/steam/apps/1623730/header.jpg -appVersion: "latest" +apiVersion: v2 +name: palworld +version: 0.0.1 +description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. +type: application +keywords: + - palworld + - server + - kubernetes + - helm +home: https://github.com/thijsvanloef/palworld-server-docker +sources: + - https://github.com/thijsvanloef/palworld-server-docker +maintainers: + - name: Filipe Souza + email: filipe.souza@mestre8d.com + url: https://github.com/Filipe-Souza +icon: https://cdn.akamai.steamstatic.com/steam/apps/1623730/header.jpg +appVersion: "latest" deprecated: false \ No newline at end of file diff --git a/chart/README.md b/charts/palworld/README.md similarity index 100% rename from chart/README.md rename to charts/palworld/README.md diff --git a/chart/VALUES_SUMMARY.md b/charts/palworld/VALUES_SUMMARY.md similarity index 100% rename from chart/VALUES_SUMMARY.md rename to charts/palworld/VALUES_SUMMARY.md diff --git a/chart/templates/configmaps.yaml b/charts/palworld/templates/configmaps.yaml similarity index 97% rename from chart/templates/configmaps.yaml rename to charts/palworld/templates/configmaps.yaml index 4dea3bf..e53158a 100644 --- a/chart/templates/configmaps.yaml +++ b/charts/palworld/templates/configmaps.yaml @@ -1,40 +1,40 @@ -{{- $cPwd := randAlphaNum 12 | nospace -}} -{{- $sName := "" -}} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Values.namespace }} - name: "{{ .Release.Name }}-env-config" - annotations: - {{- with .Values.server.config.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - app.kubernetes.io/name: "{{ .Release.Name }}-config" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "{{ .Release.Name }}-config" - app.kubernetes.io/version: {{ .Chart.AppVersion }} - {{- with .Values.server.config.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -data: - PUID: "{{ .Values.server.config.puid }}" - PGID: "{{ .Values.server.config.pgid }}" - PORT: "{{ .Values.server.config.port }}" - PLAYERS: "{{ .Values.server.config.max_players }}" - MULTITHREADING: "{{ .Values.server.config.multithreading }}" - {{ if .Values.server.config.rcon.enable }} - RCON_ENABLED: "true" - RCON_PORT: "{{ .Values.server.config.rcon.port }}" - {{ end }} - {{ if .Values.server.config.community.enable }} - COMMUNITY: "true" - SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }} - {{ end }} - {{ if .Values.server.config.server_name }} - SERVER_NAME: {{ regexReplaceAll "\\W+" .Values.server.config.server_name "_" }} - {{ else }} - SERVER_NAME: {{ printf "%s_%s" "palworld" (randAlphaNum 6 | nospace) }} +{{- $cPwd := randAlphaNum 12 | nospace -}} +{{- $sName := "" -}} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-env-config" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-config" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-config" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +data: + PUID: "{{ .Values.server.config.puid }}" + PGID: "{{ .Values.server.config.pgid }}" + PORT: "{{ .Values.server.config.port }}" + PLAYERS: "{{ .Values.server.config.max_players }}" + MULTITHREADING: "{{ .Values.server.config.multithreading }}" + {{ if .Values.server.config.rcon.enable }} + RCON_ENABLED: "true" + RCON_PORT: "{{ .Values.server.config.rcon.port }}" + {{ end }} + {{ if .Values.server.config.community.enable }} + COMMUNITY: "true" + SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }} + {{ end }} + {{ if .Values.server.config.server_name }} + SERVER_NAME: {{ regexReplaceAll "\\W+" .Values.server.config.server_name "_" }} + {{ else }} + SERVER_NAME: {{ printf "%s_%s" "palworld" (randAlphaNum 6 | nospace) }} {{ end }} \ No newline at end of file diff --git a/chart/templates/deployments.yaml b/charts/palworld/templates/deployments.yaml similarity index 97% rename from chart/templates/deployments.yaml rename to charts/palworld/templates/deployments.yaml index 20d9f1c..2c857bc 100644 --- a/chart/templates/deployments.yaml +++ b/charts/palworld/templates/deployments.yaml @@ -1,70 +1,70 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: {{ .Values.namespace }} - name: "{{ .Release.Name }}-server" -spec: - selector: - matchLabels: - app.kubernetes.io/component: "{{ .Release.Name }}-server" - strategy: - type: "{{ .Values.server.strategy }}" - template: - metadata: - annotations: - {{- with .Values.server.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - app.kubernetes.io/name: "{{ .Release.Name }}-server" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "{{ .Release.Name }}-server" - app.kubernetes.io/version: {{ .Chart.AppVersion }} - {{- with .Values.server.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - spec: - containers: - {{ if .Values.server.service.healthz.enabled }} - - name: healthz - image: "chussenot/tiny-server:latest" - imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} - ports: - - name: healthz - containerPort: 80 - protocol: TCP - {{ end }} - - name: server - image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" - imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} - resources: - {{- with .Values.server.resources }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - {{- with .Values.server.ports }} - {{- toYaml . | nindent 12 }} - {{- end }} - env: - - name: ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: "{{ .Release.Name }}-rcon-password" - key: "rconPassword" - envFrom: - - configMapRef: - name: "{{ .Release.Name }}-env-config" - volumeMounts: - - mountPath: /palworld - name: datadir - volumes: - - name: datadir - persistentVolumeClaim: - {{- if not .Values.server.storage.external }} - claimName: "{{ .Release.Name }}-datadir-pvc" - {{ else }} - claimName: "{{ .Values.server.storage.externalName }}" - {{ end }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-server" +spec: + selector: + matchLabels: + app.kubernetes.io/component: "{{ .Release.Name }}-server" + strategy: + type: "{{ .Values.server.strategy }}" + template: + metadata: + annotations: + {{- with .Values.server.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-server" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-server" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + spec: + containers: + {{ if .Values.server.service.healthz.enabled }} + - name: healthz + image: "chussenot/tiny-server:latest" + imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} + ports: + - name: healthz + containerPort: 80 + protocol: TCP + {{ end }} + - name: server + image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" + imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} + resources: + {{- with .Values.server.resources }} + {{- toYaml . | nindent 12 }} + {{- end }} + ports: + {{- with .Values.server.ports }} + {{- toYaml . | nindent 12 }} + {{- end }} + env: + - name: ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Release.Name }}-rcon-password" + key: "rconPassword" + envFrom: + - configMapRef: + name: "{{ .Release.Name }}-env-config" + volumeMounts: + - mountPath: /palworld + name: datadir + volumes: + - name: datadir + persistentVolumeClaim: + {{- if not .Values.server.storage.external }} + claimName: "{{ .Release.Name }}-datadir-pvc" + {{ else }} + claimName: "{{ .Values.server.storage.externalName }}" + {{ end }} diff --git a/chart/templates/pvcs.yaml b/charts/palworld/templates/pvcs.yaml similarity index 97% rename from chart/templates/pvcs.yaml rename to charts/palworld/templates/pvcs.yaml index c16e754..4ece1da 100644 --- a/chart/templates/pvcs.yaml +++ b/charts/palworld/templates/pvcs.yaml @@ -1,31 +1,31 @@ -{{- if not .Values.server.storage.external }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - namespace: {{ .Values.namespace }} - name: "{{ .Release.Name }}-datadir-pvc" - annotations: - {{- with .Values.server.config.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - app.kubernetes.io/name: "{{ .Release.Name }}-datadir-pvc" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "{{ .Release.Name }}-datadir-pvc" - app.kubernetes.io/version: {{ .Chart.AppVersion }} - {{- if .Values.server.storage.preventDelete }} - helm.sh/resource-policy: keep - {{ end }} - {{- with .Values.server.config.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.server.storage.size }} - storageClassName: {{ .Values.server.storage.storageClassName }} +{{- if not .Values.server.storage.external }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-datadir-pvc" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-datadir-pvc" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-datadir-pvc" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- if .Values.server.storage.preventDelete }} + helm.sh/resource-policy: keep + {{ end }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.server.storage.size }} + storageClassName: {{ .Values.server.storage.storageClassName }} {{ end }} \ No newline at end of file diff --git a/chart/templates/secrets.yaml b/charts/palworld/templates/secrets.yaml similarity index 97% rename from chart/templates/secrets.yaml rename to charts/palworld/templates/secrets.yaml index f1a3d85..6e695d4 100644 --- a/chart/templates/secrets.yaml +++ b/charts/palworld/templates/secrets.yaml @@ -1,25 +1,25 @@ -{{- define "server.rcon.password" -}} -{{- randAlphaNum 24 | nospace -}} -{{- end -}} -apiVersion: v1 -kind: Secret -metadata: - namespace: {{ .Values.namespace }} - name: "{{ .Release.Name }}-rcon-password" - annotations: - {{- with .Values.server.config.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - app.kubernetes.io/name: "{{ .Release.Name }}-rcon-password" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "{{ .Release.Name }}-rcon-password" - app.kubernetes.io/version: {{ .Chart.AppVersion }} - {{- with .Values.server.config.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -type: Opaque -stringData: +{{- define "server.rcon.password" -}} +{{- randAlphaNum 24 | nospace -}} +{{- end -}} +apiVersion: v1 +kind: Secret +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-rcon-password" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-rcon-password" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-rcon-password" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +type: Opaque +stringData: rconPassword: {{- if .Values.server.config.rcon.password }} "{{ .Values.server.config.rcon.password }}" {{ else }} "{{ include "server.rcon.password" .}}" {{ end }} \ No newline at end of file diff --git a/chart/templates/services.yaml b/charts/palworld/templates/services.yaml similarity index 97% rename from chart/templates/services.yaml rename to charts/palworld/templates/services.yaml index 2aa7fba..cf6bcb5 100644 --- a/chart/templates/services.yaml +++ b/charts/palworld/templates/services.yaml @@ -1,34 +1,34 @@ ---- -apiVersion: v1 -kind: Service -metadata: - namespace: {{ .Values.namespace }} - name: "{{ .Release.Name }}-svc" - labels: - helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - app.kubernetes.io/name: "{{ .Release.Name }}-svc" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "{{ .Release.Name }}-svc" - app.kubernetes.io/version: {{ .Chart.AppVersion }} - {{- with .Values.server.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.server.config.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - app.kubernetes.io/component: "{{ .Release.Name }}-server" - ports: - {{ if .Values.server.service.healthz.enabled }} - - name: {{ .Values.server.service.healthz.name }} - port: {{ .Values.server.service.healthz.port }} - protocol: {{ .Values.server.service.healthz.protocol }} - targetPort: {{ .Values.server.service.healthz.targetPort }} - {{ end }} - {{- with .Values.server.service.ports }} - {{- toYaml . | nindent 4 }} - {{- end }} +--- +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-svc" + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-svc" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-svc" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + app.kubernetes.io/component: "{{ .Release.Name }}-server" + ports: + {{ if .Values.server.service.healthz.enabled }} + - name: {{ .Values.server.service.healthz.name }} + port: {{ .Values.server.service.healthz.port }} + protocol: {{ .Values.server.service.healthz.protocol }} + targetPort: {{ .Values.server.service.healthz.targetPort }} + {{ end }} + {{- with .Values.server.service.ports }} + {{- toYaml . | nindent 4 }} + {{- end }} type: {{ .Values.server.service.type }} \ No newline at end of file diff --git a/chart/values.yaml b/charts/palworld/values.yaml similarity index 97% rename from chart/values.yaml rename to charts/palworld/values.yaml index 0fcf492..955d343 100644 --- a/chart/values.yaml +++ b/charts/palworld/values.yaml @@ -1,139 +1,139 @@ -# -- Namespace where the resources will be created -namespace: palworld -# -- (dict) The server configuration -# @notationType -- bigValue -server: - # -- Additional annotations to the resources - annotations: { } - # -- Additional labels to the resources - labels: { } - # -- (dict) Resources limits for the container. - resources: - limits: - cpu: 4 - memory: "12Gi" - requests: - cpu: 4 - memory: "8Gi" - # -- (dict) Define some parameters for the storage volume - storage: - # -- (bool) Define if it will use an existing PVC containing the installation data. - external: false - # -- (bool) The external PVC name to use. - externalName: "" - # -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs. - preventDelete: false - # -- The size of the pvc storage. - size: 12Gi - # -- The storage class name. - storageClassName: "" - # -- (dict) Define the parameters for the server image container - # @notationType -- bigValue - image: - # -- Name of the image, without the tag. - name: thijsvanloef/palworld-server-docker - # -- The tag of the image. - tag: latest - # -- Define the pull policy for the server image. - imagePullPolicy: IfNotPresent - - # -- (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. - # @notationType -- bigValue - ports: - # -- (dict) The "game" port definition. - # If you change this, make sure to change the service.ports.game and server.config accordingly. - - name: game - containerPort: 8211 - protocol: UDP - # -- (dict) The "query" port definition . - # If you change this, make sure to change the service.ports.query_port and server.config accordingly. - - name: query - containerPort: 27015 - protocol: UDP - # -- (dict) The "rcon" port definition . - # If you change this, make sure to change the service.ports.rcon and server.config accordingly. - - name: rcon - containerPort: 25575 - protocol: UDP - # -- (string) Change the deployment strategy - strategy: Recreate - - # -- (dict) Change the service configuration. - # If you change those, make sure to change the server.config and server.ports accordingly. - # @notationType -- bigValue - service: - # -- (bool) Enables the creation of the service component. - enabled: true - # -- Additional annotations to the resources - annotations: { } - # -- Additional labels to the resources - labels: { } - # -- (string) The type of service to be created. - type: LoadBalancer - # -- (dict) The "healthz" definition . - # Use if you need to create a TCP health check for load balancers on cloud services. - healthz: - enabled: false - name: healthz - port: 80 - protocol: TCP - targetPort: 80 - # -- (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. - # @notationType -- bigValue - ports: - # -- (dict) The "game" port definition. - # If you change this, make sure to change the server.ports.game and server.config.port accordingly. - - name: game - port: 8211 - protocol: UDP - targetPort: 8211 - # -- (dict) The "query" port definition . - # If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. - - name: query - port: 27015 - protocol: UDP - targetPort: 27015 - # -- (dict) The "rcon" port definition . - # If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. - - name: rcon - port: 25575 - protocol: UDP - targetPort: 25575 - # -- (dict) Change the game server configuration. - # 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. - # @notationType -- bigValue - config: - # -- Additional annotations to the resources - annotations: { } - # -- Additional labels to the resources - labels: { } - puid: 1000 - pgid: 1000 - port: 8211 - # -- (string) The query port of the game. - query_port: 27015 - # -- The max number of players supported. - max_players: 16 - # -- (bool) Enables the multithreading, allowing the usage of up to 4 cores (needs citation) - multithreading: true - # -- (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. - # @notationType -- bigValue - rcon: - # -- (bool) Enables/disables the rcon port. - enable: true - # -- (string) The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. - port: 25575 - # -- (string) If not provided, a random password will be generated and stored on the secret. - password: "" - community: - # -- (bool) Enables/disables the visibility of this server on Steam community servers list. - enable: true - # -- (string) If not provided, a random password will be generated and stored on the secret. - password: "" - # -- (string) If not provided, a random server name will be generated with the "palworld_" prefix. - server_name: "" +# -- Namespace where the resources will be created +namespace: palworld +# -- (dict) The server configuration +# @notationType -- bigValue +server: + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + # -- (dict) Resources limits for the container. + resources: + limits: + cpu: 4 + memory: "12Gi" + requests: + cpu: 4 + memory: "8Gi" + # -- (dict) Define some parameters for the storage volume + storage: + # -- (bool) Define if it will use an existing PVC containing the installation data. + external: false + # -- (bool) The external PVC name to use. + externalName: "" + # -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs. + preventDelete: false + # -- The size of the pvc storage. + size: 12Gi + # -- The storage class name. + storageClassName: "" + # -- (dict) Define the parameters for the server image container + # @notationType -- bigValue + image: + # -- Name of the image, without the tag. + name: thijsvanloef/palworld-server-docker + # -- The tag of the image. + tag: latest + # -- Define the pull policy for the server image. + imagePullPolicy: IfNotPresent + + # -- (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. + # @notationType -- bigValue + ports: + # -- (dict) The "game" port definition. + # If you change this, make sure to change the service.ports.game and server.config accordingly. + - name: game + containerPort: 8211 + protocol: UDP + # -- (dict) The "query" port definition . + # If you change this, make sure to change the service.ports.query_port and server.config accordingly. + - name: query + containerPort: 27015 + protocol: UDP + # -- (dict) The "rcon" port definition . + # If you change this, make sure to change the service.ports.rcon and server.config accordingly. + - name: rcon + containerPort: 25575 + protocol: UDP + # -- (string) Change the deployment strategy + strategy: Recreate + + # -- (dict) Change the service configuration. + # If you change those, make sure to change the server.config and server.ports accordingly. + # @notationType -- bigValue + service: + # -- (bool) Enables the creation of the service component. + enabled: true + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + # -- (string) The type of service to be created. + type: LoadBalancer + # -- (dict) The "healthz" definition . + # Use if you need to create a TCP health check for load balancers on cloud services. + healthz: + enabled: false + name: healthz + port: 80 + protocol: TCP + targetPort: 80 + # -- (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. + # @notationType -- bigValue + ports: + # -- (dict) The "game" port definition. + # If you change this, make sure to change the server.ports.game and server.config.port accordingly. + - name: game + port: 8211 + protocol: UDP + targetPort: 8211 + # -- (dict) The "query" port definition . + # If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. + - name: query + port: 27015 + protocol: UDP + targetPort: 27015 + # -- (dict) The "rcon" port definition . + # If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. + - name: rcon + port: 25575 + protocol: UDP + targetPort: 25575 + # -- (dict) Change the game server configuration. + # 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. + # @notationType -- bigValue + config: + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + puid: 1000 + pgid: 1000 + port: 8211 + # -- (string) The query port of the game. + query_port: 27015 + # -- The max number of players supported. + max_players: 16 + # -- (bool) Enables the multithreading, allowing the usage of up to 4 cores (needs citation) + multithreading: true + # -- (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. + # @notationType -- bigValue + rcon: + # -- (bool) Enables/disables the rcon port. + enable: true + # -- (string) The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. + port: 25575 + # -- (string) If not provided, a random password will be generated and stored on the secret. + password: "" + community: + # -- (bool) Enables/disables the visibility of this server on Steam community servers list. + enable: true + # -- (string) If not provided, a random password will be generated and stored on the secret. + password: "" + # -- (string) If not provided, a random server name will be generated with the "palworld_" prefix. + server_name: ""