Skip to content

Commit

Permalink
bumping image version to 0.24.2
Browse files Browse the repository at this point in the history
run backup before stopping, if backup enabled

added extraEnv to values to allow passing env vars to container directly
  • Loading branch information
bdelwood committed Feb 10, 2024
1 parent bbab8f0 commit 2e9e2bd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chart/palworld-k8s/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apiVersion: v2
description: A basic chart to deploy Palworld dedicated servers.
name: palworld-k8s
type: application
version: 0.3.0
appVersion: "v0.21.0"
version: 0.4.0
appVersion: "v0.24.2"
kubeVersion: ">=1.26.0-0"
sources:
- https://github.com/bdelwood/palworld-k8s
Expand Down
3 changes: 2 additions & 1 deletion chart/palworld-k8s/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# palworld-k8s

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.21.0](https://img.shields.io/badge/AppVersion-v0.21.0-informational?style=flat-square)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.24.2](https://img.shields.io/badge/AppVersion-v0.24.2-informational?style=flat-square)

A basic chart to deploy Palworld dedicated servers.

Expand All @@ -17,6 +17,7 @@ Kubernetes: `>=1.26.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity rules for pod scheduling. |
| extraEnv | object | `{}` | Define extra environment variables to pass directly to the container. Any env vars which are set by other values will be overridden. Useful for defining the env vars for setting up Discord webhooks. |
| fullnameOverride | string | `""` | Override the full name of the chart. Default is a combination of release name and chart name. |
| gameServer.auto_reboot.cron_expression | string | `"0 0 * * *"` | Cron expression for automatic reboots. Defines when to reboot. The default value schedules a reboot at midnight every day. Use standard cron format. |
| gameServer.auto_reboot.enabled | bool | `false` | Enable or disable automatic pod reboots. This feature is to alleviate some issues seen with memory leaks. |
Expand Down
3 changes: 3 additions & 0 deletions chart/palworld-k8s/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ data:
{{- with .Values.gameServer.world_parameters }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- range $key, $value := .Values.extraEnv }}
{{ $key }}: "{{ $value }}"
{{- end }}
9 changes: 9 additions & 0 deletions chart/palworld-k8s/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.gameServer.backup.enabled }}
lifecycle:
preStop:
exec:
command:
- "sh"
- "-c"
- rcon-cli save && backup
{{- end }}
envFrom:
- configMapRef:
name: {{ include "palworld-k8s.fullname" . }}
Expand Down
4 changes: 4 additions & 0 deletions chart/palworld-k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ gameServer:
# -- Time, in minutes, to send a server message to warn users before a reboot.
warn_minutes: 5

# -- Define extra environment variables to pass directly to the container.
# Any env vars which are set by other values will be overridden.
# Useful for defining the env vars for setting up Discord webhooks.
extraEnv: {}

rcon:
# -- Enable or disable RCON.
Expand Down

0 comments on commit 2e9e2bd

Please sign in to comment.