Skip to content
New issue

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

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

Already on GitHub? # to your account

minecraft: restore default value handling #246

Merged
merged 2 commits into from
Dec 14, 2024
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
2 changes: 1 addition & 1 deletion charts/minecraft/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: minecraft
version: 4.23.5
version: 4.23.6
appVersion: SeeValues
home: https://minecraft.net/
description: Minecraft server
Expand Down
2 changes: 2 additions & 0 deletions charts/minecraft/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}

{{- define "minecraft.envMap" }}
{{- if ne (toString (index . 1)) "default" }}
{{- if or (index . 1) (kindIs "float64" (index . 1)) (kindIs "bool" (index . 1)) }}
- name: {{ index . 0 }}
value: {{ index . 1 | quote }}
{{- end }}
{{- end }}
{{- end }}

{{- define "tplRender" -}}
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
Expand Down
33 changes: 27 additions & 6 deletions charts/minecraft/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@
"type": "string"
},
"maxPlayers": {
"type": "integer"
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"maxWorldSize": {
"type": "integer"
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"modrinth": {
"type": "object",
Expand All @@ -50,7 +56,7 @@
"type": "boolean"
},
"allowedVersionType": {
"enum": ["release", "beta", "alpha"]
"enum": ["release", "beta", "alpha", "default"]
}
}
},
Expand Down Expand Up @@ -135,13 +141,28 @@
}
},
"maxBuildHeight": {
"type": "integer"
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"maxTickTime": {
"type": "integer"
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"spawnProtection": {
"type": "integer"
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"viewDistance": {
"oneOf": [
{"type": "integer"},
{"enum": ["default"]}
]
},
"ftbLegacyJavaFixer": {
"anyOf": [{"type": "string", "enum": ["default"]}, {"type": "boolean"}]},
Expand Down
19 changes: 8 additions & 11 deletions charts/minecraft/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ minecraftServer:
# A server icon URL for server listings. Auto-scaled and transcoded.
icon:
# Max connected players.
maxPlayers: 20
maxPlayers: default
# This sets the maximum possible size in blocks, expressed as a radius, that the world border can obtain.
maxWorldSize: 10000
maxWorldSize: default
# Allows players to travel to the Nether.
allowNether: default
# Allows server to announce when a player gets an achievement.
Expand All @@ -219,19 +219,19 @@ minecraftServer:
# If set to true, players will be set to spectator mode if they die.
hardcore: default
# The maximum height in which building is allowed.
maxBuildHeight: 256
maxBuildHeight: default
# The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message. -1 disables this entirely.
maxTickTime: 60000
maxTickTime: default
# Determines if animals will be able to spawn.
spawnAnimals: default
# Determines if monsters will be spawned.
spawnMonsters: default
# Determines if villagers will be spawned.
spawnNPCs: default
# Sets the area that non-ops can not edit (0 to disable)
spawnProtection: 16
spawnProtection: default
# Max view distance (in chunks).
viewDistance: 10
viewDistance: default
# Define this if you want a specific map generation seed.
levelSeed:
# One of: creative, survival, adventure, spectator
Expand Down Expand Up @@ -273,10 +273,7 @@ minecraftServer:
jvmOpts: ""
# Options like -X that need to proceed general JVM options
jvmXXOpts: ""
# By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started
# If you would like to override the server configuration each time the container starts up, you can set this to true
# see https://github.com/itzg/docker-minecraft-server#server-configuration
overrideServerProperties: false
overrideServerProperties: default
# DEPRECATED: use top-level rconServiceAnnotations instead
serviceAnnotations: {}
serviceType: ClusterIP
Expand Down Expand Up @@ -309,7 +306,7 @@ minecraftServer:
# Downloads Modrinth project dependencies marked as optional
optionalDependencies: false
# The version type is used to determine the newest version to use from each project. The allowed values are: release, beta, alpha
allowedVersionType: release
allowedVersionType: default

# Config for AUTO_CURSEFORGE server type
autoCurseForge:
Expand Down
Loading