agones.dev/agones@v1.53.0/examples/gameserverallocation-deprecated.yaml (about)

     1  ---
     2  # Copyright 2018 Google LLC All Rights Reserved.
     3  #
     4  # Licensed under the Apache License, Version 2.0 (the "License");
     5  # you may not use this file except in compliance with the License.
     6  # You may obtain a copy of the License at
     7  #
     8  #     http://www.apache.org/licenses/LICENSE-2.0
     9  #
    10  # Unless required by applicable law or agreed to in writing, software
    11  # distributed under the License is distributed on an "AS IS" BASIS,
    12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  # See the License for the specific language governing permissions and
    14  # limitations under the License.
    15  
    16  #
    17  # Full example of a GameServerAllocation. This is used to allocate
    18  # A GameServer out of a set of GameServers. This could be a Fleet,
    19  # multiple Fleets, or a self managed group of GameServers.
    20  #
    21  
    22  #
    23  # For a full reference and details: https://agones.dev/site/docs/reference/gameserverallocation/
    24  #
    25  apiVersion: allocation.agones.dev/v1
    26  kind: GameServerAllocation
    27  spec:
    28    # Deprecated, use selectors instead.
    29    # GameServer selector from which to choose GameServers from.
    30    # GameServers still have the hard requirement to be `Ready` to be allocated from
    31    # however we can also make available `matchExpressions` for even greater
    32    # flexibility.
    33    # Below is an example of a GameServer allocated against a given fleet.
    34    # See: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more details
    35    required:
    36      matchLabels:
    37        game: my-game
    38      matchExpressions:
    39        - {key: tier, operator: In, values: [cache]}
    40      # Specifies which State is the filter to be used when attempting to retrieve a GameServer
    41      # via Allocation. Defaults to "Ready". The only other option is "Allocated", which can be used in conjunction with
    42      # label/annotation/player selectors to retrieve an already Allocated GameServer.
    43      gameServerState: Ready
    44      # [Stage:Alpha]
    45      # [FeatureFlag:PlayerAllocationFilter]
    46      # Provides a filter on minimum and maximum values for player capacity when retrieving a GameServer
    47      # through Allocation. Defaults to no limits.
    48      players:
    49        minAvailable: 0
    50        maxAvailable: 99
    51    # Deprecated, use selectors instead.
    52    # ordered list of preferred allocations out of the `required` set.
    53    # If the first selector is not matched, the selection attempts the second selector, and so on.
    54    # This is useful for things like smoke testing of new game servers.
    55    # This also support `matchExpressions`
    56    preferred:
    57      - matchLabels:
    58          agones.dev/fleet: green-fleet
    59      - matchLabels:
    60          agones.dev/fleet: blue-fleet
    61    # defines how GameServers are organised across the cluster.
    62    # Options include:
    63    # "Packed" (default) is aimed at dynamic Kubernetes clusters, such as cloud providers, wherein we want to bin pack
    64    # resources
    65    # "Distributed" is aimed at static Kubernetes clusters, wherein we want to distribute resources across the entire
    66    # cluster
    67    scheduling: Packed
    68    # Optional custom metadata that is added to the game server at allocation
    69    # You can use this to tell the server necessary session data
    70    metadata:
    71      labels:
    72        mode: deathmatch
    73      annotations:
    74        map: garden22