itzg / minecraft-server-charts

MIT License
272 stars 142 forks source link

Spawn protection setting bugged #227

Open alexyao2015 opened 3 weeks ago

alexyao2015 commented 3 weeks ago

The spawn protection config setting cannot be set to "0" as mentioned in the docs as it is currently bugged. Setting it to 0 will cause the envmap to evaluate to false and instead exclude the SPAWN_PROTECTION environment variable rather than including it as intended.

https://github.com/itzg/minecraft-server-charts/blob/ba5b3ba7168c3ac6f416e9c00aea35d37c0d9875/charts/minecraft/templates/_helpers.tpl#L28

https://github.com/itzg/minecraft-server-charts/blob/ba5b3ba7168c3ac6f416e9c00aea35d37c0d9875/charts/minecraft/templates/deployment.yaml#L174

itzg commented 3 weeks ago

Probably need to introduce an envIntMap similar to the envBoolMap template function.