agones.dev/agones@v1.53.0/pkg/allocation/go/allocation.swagger.json (about) 1 { 2 "swagger": "2.0", 3 "info": { 4 "title": "proto/allocation/allocation.proto", 5 "version": "version not set" 6 }, 7 "tags": [ 8 { 9 "name": "AllocationService" 10 } 11 ], 12 "schemes": [ 13 "https" 14 ], 15 "consumes": [ 16 "application/json" 17 ], 18 "produces": [ 19 "application/json" 20 ], 21 "paths": { 22 "/gameserverallocation": { 23 "post": { 24 "operationId": "Allocate", 25 "responses": { 26 "200": { 27 "description": "A successful response.", 28 "schema": { 29 "$ref": "#/definitions/allocationAllocationResponse" 30 } 31 } 32 }, 33 "parameters": [ 34 { 35 "name": "body", 36 "in": "body", 37 "required": true, 38 "schema": { 39 "$ref": "#/definitions/allocationAllocationRequest" 40 } 41 } 42 ], 43 "tags": [ 44 "AllocationService" 45 ] 46 } 47 } 48 }, 49 "definitions": { 50 "AllocationRequestSchedulingStrategy": { 51 "type": "string", 52 "enum": [ 53 "Packed", 54 "Distributed" 55 ], 56 "default": "Packed" 57 }, 58 "AllocationResponseCounterStatus": { 59 "type": "object", 60 "properties": { 61 "count": { 62 "type": "string", 63 "format": "int64" 64 }, 65 "capacity": { 66 "type": "string", 67 "format": "int64" 68 } 69 } 70 }, 71 "AllocationResponseGameServerMetadata": { 72 "type": "object", 73 "properties": { 74 "labels": { 75 "type": "object", 76 "additionalProperties": { 77 "type": "string" 78 } 79 }, 80 "annotations": { 81 "type": "object", 82 "additionalProperties": { 83 "type": "string" 84 } 85 } 86 } 87 }, 88 "AllocationResponseGameServerStatusAddress": { 89 "type": "object", 90 "properties": { 91 "type": { 92 "type": "string" 93 }, 94 "address": { 95 "type": "string" 96 } 97 }, 98 "title": "A single address; identical to corev1.NodeAddress" 99 }, 100 "AllocationResponseGameServerStatusPort": { 101 "type": "object", 102 "properties": { 103 "name": { 104 "type": "string" 105 }, 106 "port": { 107 "type": "integer", 108 "format": "int32" 109 } 110 }, 111 "description": "The gameserver port info that is allocated." 112 }, 113 "AllocationResponseListStatus": { 114 "type": "object", 115 "properties": { 116 "values": { 117 "type": "array", 118 "items": { 119 "type": "string" 120 } 121 }, 122 "capacity": { 123 "type": "string", 124 "format": "int64" 125 } 126 } 127 }, 128 "GameServerSelectorGameServerState": { 129 "type": "string", 130 "enum": [ 131 "READY", 132 "ALLOCATED" 133 ], 134 "default": "READY" 135 }, 136 "PriorityOrder": { 137 "type": "string", 138 "enum": [ 139 "Ascending", 140 "Descending" 141 ], 142 "default": "Ascending" 143 }, 144 "allocationAllocationRequest": { 145 "type": "object", 146 "properties": { 147 "namespace": { 148 "type": "string", 149 "title": "The k8s namespace that is hosting the targeted fleet of gameservers to be allocated" 150 }, 151 "multiClusterSetting": { 152 "$ref": "#/definitions/allocationMultiClusterSetting", 153 "description": "If specified, multi-cluster policies are applied. Otherwise, allocation will happen locally." 154 }, 155 "requiredGameServerSelector": { 156 "$ref": "#/definitions/allocationGameServerSelector", 157 "description": "Deprecated: Please use gameServerSelectors instead. This field is ignored if the\ngameServerSelectors field is set\nThe required allocation. Defaults to all GameServers." 158 }, 159 "preferredGameServerSelectors": { 160 "type": "array", 161 "items": { 162 "type": "object", 163 "$ref": "#/definitions/allocationGameServerSelector" 164 }, 165 "description": "Deprecated: Please use gameServerSelectors instead. This field is ignored if the\ngameServerSelectors field is set\nThe ordered list of preferred allocations out of the `required` set.\nIf the first selector is not matched, the selection attempts the second selector, and so on." 166 }, 167 "scheduling": { 168 "$ref": "#/definitions/AllocationRequestSchedulingStrategy", 169 "description": "Scheduling strategy. Defaults to \"Packed\"." 170 }, 171 "metaPatch": { 172 "$ref": "#/definitions/allocationMetaPatch", 173 "title": "Deprecated: Please use metadata instead. This field is ignored if the\nmetadata field is set" 174 }, 175 "metadata": { 176 "$ref": "#/definitions/allocationMetaPatch", 177 "title": "Metadata is optional custom metadata that is added to the game server at\nallocation. You can use this to tell the server necessary session data" 178 }, 179 "gameServerSelectors": { 180 "type": "array", 181 "items": { 182 "type": "object", 183 "$ref": "#/definitions/allocationGameServerSelector" 184 }, 185 "description": "Ordered list of GameServer label selectors.\nIf the first selector is not matched, the selection attempts the second selector, and so on.\nThis is useful for things like smoke testing of new game servers.\nNote: This field can only be set if neither Required or Preferred is set." 186 }, 187 "priorities": { 188 "type": "array", 189 "items": { 190 "type": "object", 191 "$ref": "#/definitions/allocationPriority" 192 }, 193 "description": "[Stage: Beta]\n[FeatureFlag:CountsAndLists]\n`Priorities` configuration alters the order in which `GameServers` are searched for matches to the configured `selectors`.\n\nPriority of sorting is in descending importance. I.e. The position 0 `priority` entry is checked first.\n\nFor `Packed` strategy sorting, this priority list will be the tie-breaker within the least utilised infrastructure, to ensure optimal\ninfrastructure usage while also allowing some custom prioritisation of `GameServers`.\n\nFor `Distributed` strategy sorting, the entire selection of `GameServers` will be sorted by this priority list to provide the\norder that `GameServers` will be allocated by." 194 }, 195 "counters": { 196 "type": "object", 197 "additionalProperties": { 198 "$ref": "#/definitions/allocationCounterAction" 199 }, 200 "description": "[Stage: Beta]\n[FeatureFlag:CountsAndLists]\nCounters and Lists provide a set of actions to perform\non Counters and Lists during allocation." 201 }, 202 "lists": { 203 "type": "object", 204 "additionalProperties": { 205 "$ref": "#/definitions/allocationListAction" 206 } 207 } 208 } 209 }, 210 "allocationAllocationResponse": { 211 "type": "object", 212 "properties": { 213 "gameServerName": { 214 "type": "string" 215 }, 216 "ports": { 217 "type": "array", 218 "items": { 219 "type": "object", 220 "$ref": "#/definitions/AllocationResponseGameServerStatusPort" 221 } 222 }, 223 "address": { 224 "type": "string", 225 "title": "Primary address at which game server can be reached" 226 }, 227 "addresses": { 228 "type": "array", 229 "items": { 230 "type": "object", 231 "$ref": "#/definitions/AllocationResponseGameServerStatusAddress" 232 }, 233 "title": "All addresses at which game server can be reached; copy of Node.Status.addresses" 234 }, 235 "nodeName": { 236 "type": "string" 237 }, 238 "source": { 239 "type": "string" 240 }, 241 "metadata": { 242 "$ref": "#/definitions/AllocationResponseGameServerMetadata" 243 }, 244 "counters": { 245 "type": "object", 246 "additionalProperties": { 247 "$ref": "#/definitions/AllocationResponseCounterStatus" 248 }, 249 "description": "(Beta, CountsAndLists feature flag) Status of Counters and Lists on allocation." 250 }, 251 "lists": { 252 "type": "object", 253 "additionalProperties": { 254 "$ref": "#/definitions/AllocationResponseListStatus" 255 } 256 } 257 } 258 }, 259 "allocationCounterAction": { 260 "type": "object", 261 "properties": { 262 "action": { 263 "type": "string" 264 }, 265 "amount": { 266 "type": "string", 267 "format": "int64" 268 }, 269 "capacity": { 270 "type": "string", 271 "format": "int64" 272 } 273 }, 274 "description": "CounterAction is an optional action that can be performed on a Counter at allocation.\nAction: \"Increment\" or \"Decrement\" the Counter's Count (optional). Must also define the Amount.\nAmount: The amount to increment or decrement the Count (optional). Must be a positive integer.\nCapacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max int64." 275 }, 276 "allocationCounterSelector": { 277 "type": "object", 278 "properties": { 279 "minCount": { 280 "type": "string", 281 "format": "int64" 282 }, 283 "maxCount": { 284 "type": "string", 285 "format": "int64" 286 }, 287 "minAvailable": { 288 "type": "string", 289 "format": "int64" 290 }, 291 "maxAvailable": { 292 "type": "string", 293 "format": "int64" 294 } 295 }, 296 "title": "CounterSelector is the filter options for a GameServer based on the count and/or available capacity.\n0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0" 297 }, 298 "allocationGameServerSelector": { 299 "type": "object", 300 "properties": { 301 "matchLabels": { 302 "type": "object", 303 "additionalProperties": { 304 "type": "string" 305 }, 306 "description": "Labels to match." 307 }, 308 "gameServerState": { 309 "$ref": "#/definitions/GameServerSelectorGameServerState" 310 }, 311 "players": { 312 "$ref": "#/definitions/allocationPlayerSelector" 313 }, 314 "counters": { 315 "type": "object", 316 "additionalProperties": { 317 "$ref": "#/definitions/allocationCounterSelector" 318 } 319 }, 320 "lists": { 321 "type": "object", 322 "additionalProperties": { 323 "$ref": "#/definitions/allocationListSelector" 324 } 325 } 326 }, 327 "description": "GameServerSelector used for finding a GameServer with matching filters." 328 }, 329 "allocationLabelSelector": { 330 "type": "object", 331 "properties": { 332 "matchLabels": { 333 "type": "object", 334 "additionalProperties": { 335 "type": "string" 336 }, 337 "description": "Labels to match." 338 } 339 }, 340 "description": "LabelSelector used for finding a GameServer with matching labels." 341 }, 342 "allocationListAction": { 343 "type": "object", 344 "properties": { 345 "addValues": { 346 "type": "array", 347 "items": { 348 "type": "string" 349 } 350 }, 351 "capacity": { 352 "type": "string", 353 "format": "int64" 354 }, 355 "deleteValues": { 356 "type": "array", 357 "items": { 358 "type": "string" 359 } 360 } 361 }, 362 "description": "ListAction is an optional action that can be performed on a List at allocation.\nAddValues: Append values to a List's Values array (optional). Any duplicate values will be ignored.\nCapacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max 1000.\nDeleteValues: Remove values from a List's Values array (optional). Any nonexistant values will be ignored." 363 }, 364 "allocationListSelector": { 365 "type": "object", 366 "properties": { 367 "containsValue": { 368 "type": "string" 369 }, 370 "minAvailable": { 371 "type": "string", 372 "format": "int64" 373 }, 374 "maxAvailable": { 375 "type": "string", 376 "format": "int64" 377 } 378 }, 379 "title": "ListSelector is the filter options for a GameServer based on List available capacity and/or the\nexistence of a value in a List.\n0 for MaxAvailable means unlimited maximum. Default for integer fields: 0\n\"\" for ContainsValue means ignore field. Default for string field: \"\"" 380 }, 381 "allocationMetaPatch": { 382 "type": "object", 383 "properties": { 384 "labels": { 385 "type": "object", 386 "additionalProperties": { 387 "type": "string" 388 } 389 }, 390 "annotations": { 391 "type": "object", 392 "additionalProperties": { 393 "type": "string" 394 } 395 } 396 }, 397 "title": "MetaPatch is the metadata used to patch the GameServer metadata on allocation" 398 }, 399 "allocationMultiClusterSetting": { 400 "type": "object", 401 "properties": { 402 "enabled": { 403 "type": "boolean", 404 "format": "boolean", 405 "description": "If set to true, multi-cluster allocation is enabled." 406 }, 407 "policySelector": { 408 "$ref": "#/definitions/allocationLabelSelector", 409 "description": "Selects multi-cluster allocation policies to apply. If not specified, all multi-cluster allocation policies are to be applied." 410 } 411 }, 412 "description": "Specifies settings for multi-cluster allocation." 413 }, 414 "allocationPlayerSelector": { 415 "type": "object", 416 "properties": { 417 "minAvailable": { 418 "type": "string", 419 "format": "uint64" 420 }, 421 "maxAvailable": { 422 "type": "string", 423 "format": "uint64" 424 } 425 }, 426 "description": "PlayerSelector is filter for player capacity values.\nminAvailable should always be less or equal to maxAvailable." 427 }, 428 "allocationPriority": { 429 "type": "object", 430 "properties": { 431 "type": { 432 "$ref": "#/definitions/allocationPriorityType" 433 }, 434 "key": { 435 "type": "string" 436 }, 437 "order": { 438 "$ref": "#/definitions/PriorityOrder" 439 } 440 }, 441 "description": "Priority is a sorting option for GameServers with Counters or Lists based on the Capacity.\nType: Sort by a \"Counter\" or a \"List\".\nKey: The name of the Counter or List. If not found on the GameServer, has no impact.\nOrder: Sort by \"Ascending\" or \"Descending\". \"Descending\" a bigger Capacity is preferred.\n\"Ascending\" would be smaller Capacity is preferred." 442 }, 443 "allocationPriorityType": { 444 "type": "string", 445 "enum": [ 446 "Counter", 447 "List" 448 ], 449 "default": "Counter" 450 } 451 } 452 }