itzg / minecraft-server-charts

MIT License
267 stars 142 forks source link

rcon commands in helm config file not working #206

Open Lite5h4dow opened 4 months ago

Lite5h4dow commented 4 months ago

Enhancement Type

Improve an existing feature

Describe the enhancement

rcon commands on startup, first connect, and last disconnect don't seem to apply.

would appreciate it if this compatibility was extended to the helm config unless there is another way to apply these, for example environment variables

rcon:
    # If you enable this, make SURE to change your password below.
    enabled: true
    # By default, the container will generate a random password at startup
    # to ensure internal RCON tooling, including a backup container,
    # can be used, but the password is secure.
    withGeneratedPassword: false
    port: 25575
    rconCmdsStartup: |-
      /gamerule doFireTick false
      /pregen start 1000
    rconCmdsFirstConnect: |-
      /pregen stop
    rconCmdsLastDisconnect: |-
      /pregen start 1000
itzg commented 4 months ago

As you suspected, at this point you can use extraEnv to include those three items as environment variables declared by the image itself.