Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: closes #6 and #7 #10

Merged
merged 2 commits into from
Apr 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions charts/ark-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
apiVersion: v2
name: ark-cluster
version: 0.0.14
version: 0.1.0
description: A Helm chart for an Ark - Survival Evolved cluster
type: application
appVersion: latest
home: https://store.steampowered.com/app/346110/ARK_Survival_Evolved/
keyworks:
icon: https://raw.githubusercontent.com/DrPsychick/ark-server-charts/master/charts/ark-cluster/icon.png
keywords:
- game
- server
- steam
Expand All @@ -19,6 +20,6 @@ maintainers:
annotations:
artifacthub.io/links: |
- name: Image source
url: https://github.com/thmhoag/arkserver
url: https://github.com/DrPsychick/arkserver
- name: Image DockerHub
url: https://hub.docker.com/r/drpsychick/arkcluster
3 changes: 2 additions & 1 deletion charts/ark-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,5 @@ spec:
## Credits
Inspired by
* https://github.com/itzg/minecraft-server-charts
* https://github.com/thmhoag/arkserver
* https://github.com/thmhoag/arkserver
* Icon from [Freepik](https://www.freepik.com) found on [Flaticon](https://www.flaticon.com/)
26 changes: 26 additions & 0 deletions charts/ark-cluster/ci/clustertest-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
fullnameOverride: clustertest
persistence:
enabled: false
mods:
- "731604991"
- "889745138"
servers:
extinction:
map: Extinction
sessionName: TestCluster
xpMultiplier: 4
maxPlayers: 2
ports:
queryudp: 27015
gameudp: 7777
rcon: 32330
theisland:
mods: []
maxPlayers: 2
ports:
queryudp: 27016
gameudp: 7779
rcon: 32331
customConfigMap:
EngineIni: |
# TestCluster Engine.ini
3 changes: 0 additions & 3 deletions charts/ark-cluster/ci/test-values.yaml

This file was deleted.

1 change: 1 addition & 0 deletions charts/ark-cluster/files/Engine.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Engine.ini
26 changes: 26 additions & 0 deletions charts/ark-cluster/files/Game.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[/Script/ShooterGame.ShooterGameMode]
bDisableStructurePlacementCollision=True
# 0: Health,
# 1: Stamina,
# 2: Torpidity,
# 3: Oxygen,
# 4: Food,
# 5: Water,
# 6: Temperature,
# 7: Weight,
# 8: MeleeDamageMultiplier,
# 9: SpeedMultiplier,
# 10: TemperatureFortitude,
# 11: CraftingSpeedMultiplier
#PerLevelStatsMultiplier_Player[0]=2.0
#PerLevelStatsMultiplier_Player[4]=2.0
#PerLevelStatsMultiplier_Player[5]=2.0
#PerLevelStatsMultiplier_Player[7]=2.0
#PerLevelStatsMultiplier_DinoTamed[7]=2.0
#PerLevelStatsMultiplier_DinoWild[7]=1
# https://board.nitrado.net/support-de-german-only/support-gameserver/ark-survival-evolved/103586/butgeschwindigkeit-wachstumsgeschwindigkeit/?s=6270aee8447cd08b702a7315fe1e47efe64afb1b#post681499
# https://survivetheark.com/index.php?/forums/topic/200763-help-with-breedingimprinting-settings/
#MatingIntervalMultiplier=0.1
#BabyMatureSpeedMultiplier=25.0
#EggHatchSpeedMultiplier=15.0
#BabyCuddleIntervalMultiplier=0.1
63 changes: 63 additions & 0 deletions charts/ark-cluster/files/GameUserSettings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[/Script/ShooterGame.ShooterGameUserSettings]
Version=5
[ServerSettings]
AllowFlyerCarryPvE=True
AllowThirdPersonPlayer=True
AlwaysNotifyPlayerLeft=False
AutoSavePeriodMinutes=15.000000
ClampResourceHarvestDamage=False
DifficultyOffset=1.000000
OverrideOfficialDifficulty=5.000000
DisableStructureDecayPvE=False
DontAlwaysNotifyPlayerJoined=False
EnablePvPGamma=False
GlobalVoiceChat=False
KickIdlePlayersPeriod=2400.000000
NoTributeDownloads=False
ProximityChat=False
ProximityVoiceChat=False
PvEStructureDecayDestructionPeriod=0.000000
ServerCrosshair=True
ServerForceNoHUD=False
ServerHardcore=False
ServerPassword={{ default "" .server.password }}
ServerPVE=True
ShowMapPlayerLocation=True
TamedDinoDamageMultiplier=1.000000
TamedDinoResistanceMultiplier=1.000000
StructurePreventResourceRadiusMultiplier=1.000000
RaidDinoCharacterFoodDrainMultiplier=1.000000
PvEDinoDecayPeriodMultiplier=1.000000
PerPlatformMaxStructuresMultiplier=1.000000
ListenServerTetherDistanceMultiplier=1.000000
MaxTamedDinos=5000.000000
RCONServerGameLogBuffer=600.000000
AllowHitMarkers=True
TamingSpeedMultiplier=3.000000
AllowCaveBuildingPvE=True
AllowAnyoneBabyImprintCuddle=True
ShowFloatingDamageText=True
NonPermanentDiseases=True
HarvestAmountMultiplier=1.900000
PreventDownloadSurvivors=False
PreventDownloadItems=False
PreventDownloadDinos=False
PreventUploadSurvivors=False
PreventUploadItems=False
PreventUploadDinos=False
TribeLogDestroyedEnemyStructures=True
TheMaxStructuresInRange=10500.000000
XPMultiplier={{ default 1 .server.xpMultiplier }}
ActiveMods=

[SessionSettings]
SessionName={{ .server.sessionName }}

[/Script/Engine.GameSession]

[MessageOfTheDay]
Message={{ if .server.message }}{{ .server.message }}{{ else }}Welcome on ARK {{ .server.sessionName }}{{ end }}
Duration=5

[/Game/PrimalEarth/CoreBlueprints/TestGameMode.TestGameMode_C]
bServerGameLogEnabled=True
Binary file added charts/ark-cluster/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion charts/ark-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ Usage:
{{ include "ark-cluster.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "ark-cluster.tplValue" -}}
{{- if typeIs "string" .value }}
{{- if not .value }}
{{- else if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
Expand Down
145 changes: 26 additions & 119 deletions charts/ark-cluster/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{{- $fullname := (include "ark-cluster.fullname" .) -}}
{{- $labels := (include "ark-cluster.labels" .) -}}
{{- range .Values.servers }}
{{- $fullname := (include "ark-cluster.fullname" .) }}
{{- $labels := (include "ark-cluster.labels" .) }}
{{- range $name, $server := .Values.servers }}
---
{{- $gameudp := $.Values.containerPorts.gameudp -}}
{{- $queryudp := $.Values.containerPorts.queryudp -}}
{{- $rcon := $.Values.containerPorts.rcon -}}
{{- if .ports -}}
{{- $gameudp = default $gameudp .ports.gameudp -}}
{{- $queryudp = default $queryudp .ports.queryudp -}}
{{- $rcon = default $rcon .ports.rcon -}}
{{- end -}}
{{- $gameudp := $.Values.containerPorts.gameudp }}
{{- $queryudp := $.Values.containerPorts.queryudp }}
{{- $rcon := $.Values.containerPorts.rcon }}
{{- if .ports }}
{{- $gameudp = default $gameudp .ports.gameudp }}
{{- $queryudp = default $queryudp .ports.queryudp }}
{{- $rcon = default $rcon .ports.rcon }}
{{- end }}
{{- $engineini := default dict $.Values.customConfigMap.EngineIni }}
{{- $gameini := default dict $.Values.customConfigMap.GameIni}}
{{- $gameini := default dict $.Values.customConfigMap.GameIni }}
{{- $gameusersettingsini := default dict $.Values.customConfigMap.GameUserSettingsIni }}
{{- if .customConfigMap }}
{{- $gameini = default $gameini .customConfigMap.GameIni }}
Expand All @@ -21,127 +21,34 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullname }}-{{ .name }}
name: {{ $fullname }}-{{ $name }}
namespace: {{ $.Release.Namespace }}
labels: {{- $labels | nindent 4 }}
component: {{ .name }}
{{- if $.Values.podLabels }}
{{- include "ark-cluster.tplValue" (dict "value" $.Values.podLabels "context" $) | nindent 8 }}
{{- end }}
app.kubernetes.io/component: {{ $name }}
{{- include "ark-cluster.tplValue" (dict "value" $.Values.commonLabels "context" $) | nindent 4 }}
annotations:
checksum/values: {{ toYaml $.Values | sha256sum | trunc 10 | quote }}
{{- include "ark-cluster.annotations" (dict "annotations" $.Values.commonAnnotations "context" $) | trim | indent 4 }}
checksum/values: {{ toYaml $server | sha256sum | trunc 10 | quote }}
{{- include "ark-cluster.annotations" (dict "annotations" $.Values.commonAnnotations "context" $) | indent 4 }}
data:
Engine.ini: |
{{- if $engineini }}
# from {{ .name }}.customConfig.EngineIni
{{- $engineini | nindent 4 }}
# from {{ $name }}.customConfig.EngineIni
{{- tpl $engineini (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- else }}
# Engine.ini
{{- tpl ($.Files.Get "files/Engine.ini") (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- end }}
Game.ini: |
{{- if $gameini }}
# from {{ .name }}.customConfig.GameIni
{{- $gameini | nindent 4 }}
# from {{ $name }}.customConfig.GameIni
{{- tpl $gameini (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- else }}
[/Script/ShooterGame.ShooterGameMode]
bDisableStructurePlacementCollision=True
# 0: Health,
# 1: Stamina,
# 2: Torpidity,
# 3: Oxygen,
# 4: Food,
# 5: Water,
# 6: Temperature,
# 7: Weight,
# 8: MeleeDamageMultiplier,
# 9: SpeedMultiplier,
# 10: TemperatureFortitude,
# 11: CraftingSpeedMultiplier
#PerLevelStatsMultiplier_Player[0]=2.0
#PerLevelStatsMultiplier_Player[4]=2.0
#PerLevelStatsMultiplier_Player[5]=2.0
#PerLevelStatsMultiplier_Player[7]=2.0
#PerLevelStatsMultiplier_DinoTamed[7]=2.0
#PerLevelStatsMultiplier_DinoWild[7]=1
# https://board.nitrado.net/support-de-german-only/support-gameserver/ark-survival-evolved/103586/butgeschwindigkeit-wachstumsgeschwindigkeit/?s=6270aee8447cd08b702a7315fe1e47efe64afb1b#post681499
# https://survivetheark.com/index.php?/forums/topic/200763-help-with-breedingimprinting-settings/
#MatingIntervalMultiplier=0.1
#BabyMatureSpeedMultiplier=25.0
#EggHatchSpeedMultiplier=15.0
#BabyCuddleIntervalMultiplier=0.1
{{- tpl ($.Files.Get "files/Game.ini") (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- end }}
GameUserSettings.ini: |
{{- if $gameusersettingsini }}
# from {{ .name }}.customConfig.GameUserSettingsIni
{{- $gameusersettingsini | nindent 4 }}
# from {{ $name }}.customConfig.GameUserSettingsIni
{{- tpl $gameusersettingsini (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- else }}
[/Script/ShooterGame.ShooterGameUserSettings]
Version=5
[ServerSettings]
AllowFlyerCarryPvE=True
AllowThirdPersonPlayer=True
AlwaysNotifyPlayerLeft=False
AutoSavePeriodMinutes=15.000000
ClampResourceHarvestDamage=False
DifficultyOffset=1.000000
OverrideOfficialDifficulty=5.000000
DisableStructureDecayPvE=False
DontAlwaysNotifyPlayerJoined=False
EnablePvPGamma=False
GlobalVoiceChat=False
KickIdlePlayersPeriod=2400.000000
NoTributeDownloads=False
ProximityChat=False
ProximityVoiceChat=False
PvEStructureDecayDestructionPeriod=0.000000
ServerCrosshair=True
ServerForceNoHUD=False
ServerHardcore=False
ServerPassword={{ default "" .password }}
ServerPVE=True
ShowMapPlayerLocation=True
TamedDinoDamageMultiplier=1.000000
TamedDinoResistanceMultiplier=1.000000
StructurePreventResourceRadiusMultiplier=1.000000
RaidDinoCharacterFoodDrainMultiplier=1.000000
PvEDinoDecayPeriodMultiplier=1.000000
PerPlatformMaxStructuresMultiplier=1.000000
ListenServerTetherDistanceMultiplier=1.000000
MaxTamedDinos=5000.000000
RCONServerGameLogBuffer=600.000000
AllowHitMarkers=True
TamingSpeedMultiplier=3.000000
AllowCaveBuildingPvE=True
AllowAnyoneBabyImprintCuddle=True
ShowFloatingDamageText=True
NonPermanentDiseases=True
HarvestAmountMultiplier=1.900000
PreventDownloadSurvivors=False
PreventDownloadItems=False
PreventDownloadDinos=False
PreventUploadSurvivors=False
PreventUploadItems=False
PreventUploadDinos=False
TribeLogDestroyedEnemyStructures=True
TheMaxStructuresInRange=10500.000000
XPMultiplier={{ default 1 .xpMultiplier }}
ActiveMods=

[SessionSettings]
SessionName={{ .sessionName }}

[/Script/Engine.GameSession]

[MessageOfTheDay]
{{- if .message }}
Message={{ .message }}
{{- else }}
Message=Welcome on ARK {{ .name }}
{{- end }}
Duration=5

[/Game/PrimalEarth/CoreBlueprints/TestGameMode.TestGameMode_C]
bServerGameLogEnabled=True
{{- tpl ($.Files.Get "files/GameUserSettings.ini") (dict "server" $server "Template" $.Template) | nindent 4 }}
{{- end }}
{{- end }}
Loading