apiVersion: v1
kind: ConfigMap
metadata:
  name: mattermost-loadtestconfig-json
data:
  loadtestconfig.json: |
    {
      "ConnectionConfiguration": {
        "ServerURL": "http://%MM_URL%",
        "WebsocketURL": "ws://%MM_URL%",
        "PProfUrl": "http://mattermost-loadtest-app:8067/debug/pprof",
        "DriverName": "mysql",
        "DataSource": "%DATA_SOURCE%",
        "LocalCommands": true,
        "SSHHostnamePort": "",
        "SSHUsername": "",
        "SSHPassword": "",
        "SSHKey": "",
        "MattermostInstallDir": "/mattermost",
        "ConfigFileLoc": "",
        "AdminEmail": "%ADMIN_EMAIL%",
        "AdminPassword": "%ADMIN_PASSWORD%",
        "SkipBulkload": true,
        "WaitForServerStart": true
      },
      "LoadtestEnviromentConfig": {
        "NumTeams": 1,
        "NumChannelsPerTeam": 500,
        "NumUsers": 10000,
        "PercentHighVolumeTeams": 0.2,
        "PercentMidVolumeTeams": 0.5,
        "PercentLowVolumeTeams": 0.3,
        "PercentUsersHighVolumeTeams": 0.9,
        "PercentUsersMidVolumeTeams": 0.5,
        "PercentUsersLowVolumeTeams": 0.1,
        "PercentHighVolumeChannels": 0.2,
        "PercentMidVolumeChannels": 0.5,
        "PercentLowVolumeChannels": 0.3,
        "PercentUsersHighVolumeChannel": 0.01,
        "PercentUsersMidVolumeChannel": 0.003,
        "PercentUsersLowVolumeChannel": 0.0002,
        "HighVolumeTeamSelectionWeight": 3,
        "MidVolumeTeamSelectionWeight": 2,
        "LowVolumeTeamSelectionWeight": 1,
        "HighVolumeChannelSelectionWeight": 1,
        "MidVolumeChannelSelectionWeight": 3,
        "LowVolumeChannelSelectionWeight": 1
      },
      "UserEntitiesConfiguration": {
        "TestLengthMinutes": 20,
        "NumActiveEntities": 1250,
        "ActionRateMilliseconds": 240000,
        "ActionRateMaxVarianceMilliseconds": 1500,
        "EnableRequestTiming": true,
        "ChannelLinkChance": 0.02,
        "UploadImageChance": 0.01,
        "LinkPreviewChance": 0.2,
        "CustomEmojiChance": 0.2,
        "NeedsProfilesByUsernameChance": 0.38,
        "NeedsProfilesByIdChance": 0.22,
        "NeedsProfileStatusChance": 0.80,
        "DoStatusPolling": true,
        "RandomizeEntitySelection": false
      },
      "ResultsConfiguration": {
        "PProfDelayMinutes": 15,
        "PProfLength": 60
      },
      "LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "INFO",
        "ConsoleJson": true,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "loadtest.log"
      }
    }