agones.dev/agones@v1.53.0/examples/counterfleetautoscaler.yaml (about)

     1  ---
     2  # Copyright 2023 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  # [Stage:Beta]
    18  # [FeatureFlag:CountsAndLists]
    19  # Example of a FleetAutoscaler - this is used to scale a Fleet automatically depending on the
    20  # available capacity of a Counter across the fleet.
    21  #
    22  
    23  #
    24  # For a full reference and details: https://agones.dev/site/docs/reference/fleetautoscaler/
    25  #
    26  apiVersion: autoscaling.agones.dev/v1
    27  kind: FleetAutoscaler
    28  metadata:
    29    name: fleet-autoscaler-counter
    30  spec:
    31    fleetName: fleet-example
    32    policy:
    33      type: Counter  # Counter based autoscaling
    34      counter:
    35        # Key is the name of the Counter. Required field.
    36        key: rooms
    37        # BufferSize is the size of a buffer of counted items that are available in the Fleet (available capacity).
    38        # Value can be an absolute number (ex: 5) or a percentage of the Counter available capacity (ex: 5%).
    39        # An absolute number is calculated from percentage by rounding up. Must be bigger than 0. Required field.
    40        bufferSize: 5
    41        # MinCapacity is the minimum aggregate Counter total capacity across the fleet.
    42        # If BufferSize is specified as a percentage, MinCapacity is required and cannot be 0.
    43        # If non zero, MinCapacity must be smaller than MaxCapacity and must be greater than or equal to BufferSize.
    44        minCapacity: 10
    45        # MaxCapacity is the maximum aggregate Counter total capacity across the fleet.
    46        # MaxCapacity must be greater than or equal to both MinCapacity and BufferSize. Required field.
    47        maxCapacity: 100