TrueChartsCatalogClone/stable/palworld/2.8.14/ix_values.yaml

358 lines
15 KiB
YAML

image:
repository: ghcr.io/ich777/steamcmd
pullPolicy: IfNotPresent
tag: palworld@sha256:bbfe940fa45ff52130aef337d562b7d592f2e5fd1d81be1ed4b4e5013f28c7a1
rconImage:
repository: outdead/rcon
pullPolicy: IfNotPresent
tag: latest@sha256:f4ab6d4f86525e2d71534b839cc4e2241ffc9278759f7a70ef3aa434c5aec927
securityContext:
container:
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
service:
main:
ports:
main:
protocol: udp
port: 8211
rcon:
enabled: true
ports:
rcon:
enabled: true
protocol: tcp
port: 25575
palworld:
steam:
id: "2394010"
username: ""
password: ""
validate: false
game:
name: "TrueCharts Palworld Server"
description: "A Palworld Server running in Kubernetes"
use_auth: true
password: ""
admin_password: ""
auto_reset_guild_time_no_online_players: "72.000000"
ban_list_url: "https://api.palworldgame.com/api/banlist.txt"
base_camp_max: 128
base_camp_worker_max: 15
build_object_damage_rate: "1.000000"
build_object_deterioration_damage_rate: "1.000000"
can_pickup_other_guild_death_penalty_drop: false
collection_drop_rate: "1.000000"
collection_object_hp_rate: "1.000000"
collection_object_respawn_speed_rate: "1.000000"
day_time_speed_rate: "1.000000"
death_penalty: "ALL"
difficulty: "None"
drop_item_alive_max_hours: "1.000000"
drop_item_max: 3000
drop_item_max_unko: 100
enable_aim_assist_kb: false
enable_aim_assist_pad: false
enable_defense_other_guild_player: true
enable_fast_travel: true
enable_friendly_fire: false
enable_invader_enemy: true
active_unko: false
enable_non_login_penalty: true
enable_pvp_damage: false
exist_players_after_logout: true
enemy_drop_item_rate: "1.000000"
exp_rate: "1.000000"
guild_auto_reset_no_online_players: false
is_multiplay: false
is_pvp: false
is_start_location_select_by_map: true
max_players: 32
max_players_coop: 4
max_players_guild: 20
night_time_speed_rate: "1.000000"
pal_auto_hp_regene_rate: "1.000000"
pal_auto_hp_regene_rate_in_sleep: "1.000000"
pal_capture_rate: "1.000000"
pal_damage_rate_attack: "1.000000"
pal_damage_rate_defense: "1.000000"
pal_egg_default_hatching_time: "72.000000"
pal_spawn_num_rate: "1.000000"
pal_stamina_decreace_rate: "1.000000"
pal_stomach_decreace_rate: "1.000000"
player_auto_hp_regene_rate: "1.000000"
player_auto_hp_regene_rate_in_sleep: "1.000000"
player_damage_rate_attack: "1.000000"
player_damage_rate_defense: "1.000000"
player_stamina_decreace_rate: "1.000000"
player_stomach_decreace_rate: "1.000000"
region: ""
work_speed_rate: "1.000000"
update_public_ip: false
public_ip: ""
params:
- -publiclobby
params_extra:
- -useperfthreads
- -NoAsyncLoadingThread
- -UseMultithreadForDS
backup:
enabled: true
interval: 120
to_keep: 12
rcon:
enabled: true
timeout: 10s
workload:
main:
podSpec:
initContainers:
update-config-ini:
enabled: true
type: init
imageSelector: "image"
command:
- /bin/sh
- -c
args:
- |
config={{ .Values.persistence.serverfiles.targetSelector.main.main.mountPath }}/Pal/Saved/Config/LinuxServer
cfgFile=${config}/PalWorldSettings.ini
dfCfgFile={{ .Values.persistence.serverfiles.targetSelector.main.main.mountPath }}/DefaultPalWorldSettings.ini
update_public_ip="{{ .Values.palworld.game.update_public_ip }}"
mkdir -p ${config}
if [ ! -f "${cfgFile}" ]; then
if [ -f "${dfCfgFile}" ]; then
echo "Default config file found, copying as cfgFile..."
cp "${dfCfgFile}" "${cfgFile}"
else
echo "Config file not found, fetching..."
# Fetch the config file if it doesn't exist, just like the container does
wget -qO "${cfgFile}" https://github.com/ich777/docker-steamcmd-server/raw/palworld/config/PalWorldSettings.ini
fi
fi
set_ini() {
local key="${1}"
local value="${2}"
local flags="" # Initialize an empty string for flags
# Loop through arguments starting from the third one
for arg in "$@"; do
if [ "$arg" != "$key" ] && [ "$arg" != "$value" ]; then
flags="$flags $arg" # Append each flag to the flags string
fi
done
# Check if the key exists in the OptionSettings section
if ! grep -q 'OptionSettings=(' "$cfgFile"; then
echo "OptionSettings section not found in '${cfgFile}'. Skipping..."
return
fi
# Check if the key exists within the OptionSettings section
if ! grep -q "${key}=" "$cfgFile"; then
echo "Key '${key}' does not exist in the OptionSettings section of '${cfgFile}'. Skipping..."
return
fi
# Iterate over flags
for flag in $flags; do
case $flag in
-q)
# Add quotes around the value
value="\"$value\""
;;
-b)
# Handle boolean flag
if [ "$(echo "$value" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
value="True"
else
value="False"
fi
;;
*)
echo "Unknown flag: $flag. Skipping..."
;;
esac
done
# Update the value within the OptionSettings section
sed -i "/OptionSettings=(/ {
:loop
/)$/! {
N
b loop
}
s|\(${key}=\)[^,]*|\1${value}|
}" "${cfgFile}"
# Check if the closing parenthesis is missing, and if so, add it
if ! grep -q ')$' "${cfgFile}"; then
sed -i "\|OptionSettings=(| s|$|)|" "${cfgFile}"
fi
echo "Set ${key} to ${value}"
}
echo "the following options are updating...."
set_ini "RCONEnabled" "True" -b
set_ini "RCONPort" "{{ .Values.service.rcon.ports.rcon.port }}"
set_ini "PublicPort" "{{ .Values.service.main.ports.main.port }}"
set_ini "ServerPassword" '{{ .Values.palworld.game.password }}' -q
set_ini "AdminPassword" '{{ .Values.palworld.game.admin_password }}' -q
set_ini "ServerName" '{{ .Values.palworld.game.name }}' -q
set_ini "ServerDescription" '{{ .Values.palworld.game.description }}' -q
set_ini "Difficulty" "{{ .Values.palworld.game.difficulty }}" -q
set_ini "DeathPenalty" "{{ .Values.palworld.game.death_penalty }}" -q
set_ini "Region" "{{ .Values.palworld.game.region }}" -q
set_ini "AutoResetGuildTimeNoOnlinePlayers" "{{ .Values.palworld.game.auto_reset_guild_time_no_online_players }}"
set_ini "BaseCampMaxNum" "{{ .Values.palworld.game.base_camp_max }}"
set_ini "BaseCampWorkerMaxNum" "{{ .Values.palworld.game.base_camp_worker_max }}"
set_ini "BanListURL" "{{ .Values.palworld.game.ban_list_url }}" -q
set_ini "BuildObjectDamageRate" "{{ .Values.palworld.game.build_object_damage_rate }}"
set_ini "BuildObjectDeteriorationDamageRate" "{{ .Values.palworld.game.build_object_deterioration_damage_rate }}"
set_ini "bCanPickupOtherGuildDeathPenaltyDrop" "{{ .Values.palworld.game.can_pickup_other_guild_death_penalty_drop }}" -b
set_ini "bUseAuth" "{{ .Values.palworld.game.use_auth }}" -b
set_ini "bEnablePlayerToPlayerDamage" "{{ .Values.palworld.game.enable_pvp_damage }}" -b
set_ini "bEnableFriendlyFire" "{{ .Values.palworld.game.enable_friendly_fire }}" -b
set_ini "bEnableInvaderEnemy" "{{ .Values.palworld.game.enable_invader_enemy }}" -b
set_ini "bEnableAimAssistPad" "{{ .Values.palworld.game.enable_aim_assist_pad }}" -b
set_ini "bEnableAimAssistKeyboard" "{{ .Values.palworld.game.enable_aim_assist_kb }}" -b
set_ini "bEnableNonLoginPenalty" "{{ .Values.palworld.game.enable_non_login_penalty }}" -b
set_ini "bEnableFastTravel" "{{ .Values.palworld.game.enable_fast_travel }}" -b
set_ini "bEnableDefenseOtherGuildPlayer" "{{ .Values.palworld.game.enable_defense_other_guild_player }}" -b
set_ini "bIsMultiplay" "{{ .Values.palworld.game.is_multiplay }}" -b
set_ini "bIsStartLocationSelectByMap" "{{ .Values.palworld.game.is_start_location_select_by_map }}" -b
set_ini "bIsPvP" "{{ .Values.palworld.game.is_pvp }}" -b
set_ini "bExistPlayerAfterLogout" "{{ .Values.palworld.game.exist_players_after_logout }}" -b
set_ini "bActiveUNKO" "{{ .Values.palworld.game.active_unko }}" -b
set_ini "bAutoResetGuildNoOnlinePlayers" "{{ .Values.palworld.game.guild_auto_reset_no_online_players }}" -b
set_ini "CollectionDropRate" "{{ .Values.palworld.game.collection_drop_rate }}"
set_ini "CollectionObjectHpRate" "{{ .Values.palworld.game.collection_object_hp_rate }}"
set_ini "CollectionObjectRespawnSpeedRate" "{{ .Values.palworld.game.collection_object_respawn_speed_rate }}"
set_ini "CoopPlayerMaxNum" "{{ .Values.palworld.game.max_players_coop }}"
set_ini "DayTimeSpeedRate" "{{ .Values.palworld.game.day_time_speed_rate }}"
set_ini "DropItemMaxNum" "{{ .Values.palworld.game.drop_item_max }}"
set_ini "DropItemMaxNum_UNKO" "{{ .Values.palworld.game.drop_item_max_unko }}"
set_ini "DropItemAliveMaxHours" "{{ .Values.palworld.game.drop_item_alive_max_hours }}"
set_ini "EnemyDropItemRate" "{{ .Values.palworld.game.enemy_drop_item_rate }}"
set_ini "GuildPlayerMaxNum" "{{ .Values.palworld.game.max_players_guild }}"
set_ini "NightTimeSpeedRate" "{{ .Values.palworld.game.night_time_speed_rate }}"
set_ini "PalCaptureRate" "{{ .Values.palworld.game.pal_capture_rate }}"
set_ini "PalEggDefaultHatchingTime" "{{ .Values.palworld.game.pal_egg_default_hatching_time }}"
set_ini "PalSpawnNumRate" "{{ .Values.palworld.game.pal_spawn_num_rate }}"
set_ini "PalDamageRateAttack" "{{ .Values.palworld.game.pal_damage_rate_attack }}"
set_ini "PalDamageRateDefense" "{{ .Values.palworld.game.pal_damage_rate_defense }}"
set_ini "PlayerDamageRateAttack" "{{ .Values.palworld.game.player_damage_rate_attack }}"
set_ini "PlayerDamageRateDefense" "{{ .Values.palworld.game.player_damage_rate_defense }}"
set_ini "PlayerStomachDecreaceRate" "{{ .Values.palworld.game.player_stomach_decreace_rate }}"
set_ini "PlayerStaminaDecreaceRate" "{{ .Values.palworld.game.player_stamina_decreace_rate }}"
set_ini "PlayerAutoHPRegeneRate" "{{ .Values.palworld.game.player_auto_hp_regene_rate }}"
set_ini "PlayerAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.player_auto_hp_regene_rate_in_sleep }}"
set_ini "PalStomachDecreaceRate" "{{ .Values.palworld.game.pal_stomach_decreace_rate }}"
set_ini "PalStaminaDecreaceRate" "{{ .Values.palworld.game.pal_stamina_decreace_rate }}"
set_ini "PalAutoHPRegeneRate" "{{ .Values.palworld.game.pal_auto_hp_regene_rate }}"
set_ini "PalAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.pal_auto_hp_regene_rate_in_sleep }}"
set_ini "ServerPlayerMaxNum" "{{ .Values.palworld.game.max_players }}"
set_ini "WorkSpeedRate" "{{ .Values.palworld.game.work_speed_rate }}"
set_ini "ExpRate" "{{ .Values.palworld.game.exp_rate }}"
# Check if update_public_ip is not true
if [ "${update_public_ip}" != "true" ]; then
set_ini "PublicIP" "{{ .Values.palworld.game.public_ip }}" -q
fi
echo "Done!"
containers:
main:
probes:
liveness:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
readiness:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
startup:
type: tcp
port: "{{ .Values.service.rcon.ports.rcon.port }}"
env:
# paths
STEAMCMD_DIR: "{{ .Values.persistence.steamcmd.mountPath }}"
SERVER_DIR: "{{ .Values.persistence.serverfiles.targetSelector.main.main.mountPath }}"
# steam
GAME_ID: "{{ .Values.palworld.steam.id }}"
USERNAME: "{{ .Values.palworld.steam.username }}"
PASSWRD: "{{ .Values.palworld.steam.password }}"
VALIDATE: "{{ .Values.palworld.steam.validate }}"
# game
SRV_ADMIN_PWD: "{{ .Values.palworld.game.admin_password }}"
UPDATE_PUBLIC_IP: "{{ .Values.palworld.game.update_public_ip }}"
GAME_PARAMS: '{{ printf "-port=%v -publicport=%v -rconport=%v %s" .Values.service.main.ports.main.port .Values.service.main.ports.main.port .Values.service.rcon.ports.rcon.port (join " " .Values.palworld.game.params) }}'
GAME_PARAMS_EXTRA: '{{ join " " .Values.palworld.game.params_extra }}'
# backup
BACKUP: "{{ .Values.palworld.backup.enabled }}"
BACKUP_INTERVAL: "{{ .Values.palworld.backup.interval }}"
BACKUP_TO_KEEP: "{{ .Values.palworld.backup.to_keep }}"
rcon:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
rcon:
primary: true
enabled: true
imageSelector: rconImage
tty: true
stdin: true
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
persistence:
steamcmd:
enabled: true
mountPath: /serverdata/steamcmd
serverfiles:
enabled: true
targetSelector:
main:
main:
mountPath: /serverdata/serverfiles
update-config-ini:
mountPath: /serverdata/serverfiles
palworld-rcon:
enabled: true
type: configmap
objectName: palworld-rcon
targetSelector:
rcon:
rcon:
mountPath: /rcon.yaml
subPath: rcon.yaml
readOnly: true
portal:
open:
enabled: false