apiVersion: v1
kind: ConfigMap
metadata:
  name: ark-manager-cm
data:
  arkmanager.cfg: |-
    # First settings that are actually for the Ark Manager itself

    # Change the location of config files to match what's provided externally (for instance by the Kubernetes setup from KubicArk)
    arkGameUserSettingsIniFile=/ark/MergedGameUserSettings.ini
    arkGameIniFile=/ark/MergedGame.ini

    # config environment
    arkwarnminutes="15"                                             # number of minutes to warn players when using update --warn
    arkBackupPreUpdate="true"                                       # set this to true if you want to perform a backup before updating

    # Modify as desired, putting the %d replacement operator where the number belongs
    msgWarnUpdateMinutes="This ARK server will shutdown for an update in %d minutes"
    msgWarnUpdateSeconds="This ARK server will shutdown for an update in %d seconds"
    msgWarnRestartMinutes="This ARK server will shutdown for a restart in %d minutes"
    msgWarnRestartSeconds="This ARK server will shutdown for a restart in %d seconds"
    msgWarnShutdownMinutes="This ARK server will shutdown in %d minutes"
    msgWarnShutdownSeconds="This ARK server will shutdown in %d seconds"

    # Options to automatically remove old backups to keep backup size in check - Each compressed backup is generally about 1-2MB in size.
    #arkMaxBackupSizeMB="500"                                       # Set to automatically remove old backups when size exceeds this limit
    arkMaxBackupSizeGB="2"

    # --------------------------------------------------------------------------------------------------------------------------------------- #
    # Game settings of various kinds and formats. Note that an arkflag may still list a true/false value *here* to determine active flag or not
    # At least some of these can be replaced by comparable settings in the ini files, but any settings done here will have precedence
    # Note that some env vars are set in the Docker image and not overridden via Kubernetes - we can simply remap ports there instead!

    # If the option is part of the settings string (e.g. ?NonPermanentDiseases=true), then it is prefixed with ark_
    # If the option is a dash option without an argument (e.g. -automanagedmods), then it is prefixed with arkflag_
    # If the option is a dash option with an argument (e.g. -culture=en), then it is prefixed with arkopt_

    serverMap=${SERVERMAP}                                          # server map (default TheIsland)
    ark_SessionName=${SESSIONNAME}                                  # if your session name needs special characters please use the .ini instead
    ark_Port=${STEAMPORT}                                           # ARK server port (default 7778)
    ark_QueryPort=${SERVERPORT}                                     # ARK query port (default 27016)
    ark_RCONEnabled="True"                                          # Enable RCON Protocol
    ark_RCONPort=${RCONPORT}                                        # RCON Port

    ark_ServerPassword=${SERVERPASSWORD}                            # ARK server password, empty: no password required to login
    ark_ServerAdminPassword=${ADMINPASSWORD}                        # ARK server admin password, KEEP IT SAFE!
    ark_MaxPlayers=${MAX_PLAYERS}                                   # Number MAX of player
    ark_BanListURL="http://playark.com/banlist.txt"

    arkflag_log=""
    arkflag_USEALLAVAILABLECORES=true
    arkflag_crossplay=true
    arkflag_NoTransferFromFiltering=true
    arkflag_NoBattlEye=true

    # Clustering
    arkopt_clusterid=kubicarkcluster
    arkopt_ClusterDirOverride=/ark-shared
