# yaml-language-server: $schema=./values.schema.json
image:
  repository: ghcr.io/ich777/steamcmd
  tag: sonsoftheforest@sha256:fc451cd409dc22b2cd47490e20c226fadf6af3aae283445339c68cb57d915260
  pullPolicy: IfNotPresent

securityContext:
  container:
    runAsNonRoot: false
    readOnlyRootFilesystem: false
    runAsUser: 0
    runAsGroup: 0

service:
  main:
    ports:
      main:
        protocol: udp
        port: 8766
  query:
    enabled: true
    ports:
      query:
        enabled: true
        protocol: udp
        port: 27016
  sync:
    enabled: true
    ports:
      sync:
        enabled: true
        protocol: udp
        port: 9700

sonsoftheforest:
  game:
    id: "2465200"
    user: ""
    password: ""
    validate: false
    params: []
  server:
    IpAddress: "0.0.0.0"
    GamePort: "{{ .Values.service.main.ports.main.port }}"
    QueryPort: "{{ .Values.service.query.ports.query.port }}"
    BlobSyncPort: "{{ .Values.service.sync.ports.sync.port }}"
    ServerName: "Sons Of The Forest Docker Server"
    MaxPlayers: 8
    Password: ""
    LanOnly: false
    # integer, equal to or greater than 1
    SaveSlot: 1
    # new, continue
    SaveMode: "continue"
    # peaceful, normal, hard, hardsurvival, custom
    GameMode: "normal"
    SaveInterval: 600
    IdleDayCycleSpeed: "0.0"
    IdleTargetFramerate: 5
    ActiveTargetFramerate: 60
    LogFilesEnabled: false
    TimestampLogFilenames: true
    TimestampLogEntries: true
    SkipNetworkAccessibilityTest: false
    GameSettings:
      Gameplay.TreeRegrowth: true
      Structure.Damage: true
    CustomGameModeSettings:
      # Multiplayer
      GameSetting.Multiplayer.Cheats: false
      # Vail
      GameSetting.Vail.EnemySpawn: true
      # low, normal, high
      GameSetting.Vail.EnemyHealth: "normal"
      # low, normal, high
      GameSetting.Vail.EnemyDamage: "normal"
      # low, normal, high
      GameSetting.Vail.EnemyArmour: "normal"
      # low, normal, high
      GameSetting.Vail.EnemyAggression: "normal"
      # low, normal, high
      GameSetting.Vail.AnimalSpawnRate: "normal"
      # Environment
      # spring, summer, autumn, winter
      GameSetting.Environment.StartingSeason: "Summer"
      # short, default, long, realistic
      GameSetting.Environment.SeasonLength: "default"
      # short, default, long, realistic
      GameSetting.Environment.DayLength: "default"
      # low, default, high
      GameSetting.Environment.PrecipitationFrequency: "default"
      # not a dupe key.
      Structure.Damage: true
      # Survival
      # normal, hard
      GameSetting.Survival.ConsumableEffects: "normal"
      # off, normal, hard
      GameSetting.Survival.PlayerStatsDamage: "off"
      # off, normal, hard
      GameSetting.Survival.ColdPenalties: "off"
      GameSetting.Survival.ReducedFoodInContainers: false
      GameSetting.Survival.SingleUssonsoftheforestntainers: false

workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              enabled: false
            readiness:
              enabled: false
            startup:
              enabled: false
          env:
            GAME_PORT: "{{ .Values.service.main.ports.main.port }}"
            STEAMCMD_DIR: "{{ .Values.persistence.steamcmd.mountPath }}"
            SERVER_DIR: "{{ .Values.persistence.serverfiles.mountPath }}"
            GAME_ID: "{{ .Values.sonsoftheforest.game.id }}"
            USERNAME: "{{ .Values.sonsoftheforest.game.user }}"
            PASSWRD: "{{ .Values.sonsoftheforest.game.password }}"
            GAME_PARAMS: '{{ join " " .Values.sonsoftheforest.game.params }}'
            VALIDATE: "{{ .Values.sonsoftheforest.game.validate }}"

persistence:
  steamcmd:
    enabled: true
    mountPath: /serverdata/steamcmd
  serverfiles:
    enabled: true
    mountPath: /serverdata/serverfiles
  dedicatedserver-dscfg:
    enabled: true
    type: configmap
    objectName: sonsoftheforest-dscfg
    targetSelector:
      main:
        main:
          mountPath: /serverdata/serverfiles/userdata/dedicatedserver.cfg
          subPath: dedicatedserver.cfg
          readOnly: true
