agones.dev/agones@v1.54.0/examples/fleet.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 Fleet resource - a set of warm GameServers 18 # that are available to be allocated from. 19 # To allocate a GameServer from a Fleet, use a GameServerAllocation 20 # 21 22 # 23 # For a full reference and details: https://agones.dev/site/docs/reference/fleet/ 24 # 25 apiVersion: agones.dev/v1 26 kind: Fleet 27 metadata: 28 name: fleet-example 29 spec: 30 # the number of GameServers to keep Ready or Allocated in this Fleet. Defaults to 0 31 replicas: 2 32 # defines how GameServers are organised across the cluster. 33 # Options include: 34 # "Packed" (default) is aimed at dynamic Kubernetes clusters, such as cloud providers, wherein we want to bin pack 35 # resources 36 # "Distributed" is aimed at static Kubernetes clusters, wherein we want to distribute resources across the entire 37 # cluster 38 scheduling: Packed 39 # a GameServer template - see: 40 # https://agones.dev/site/docs/reference/gameserver/ for all the options 41 strategy: 42 # The replacement strategy for when the GameServer template is changed. Default option is "RollingUpdate", 43 # "RollingUpdate" will increment by maxSurge value on each iteration, while decrementing by maxUnavailable on each 44 # iteration, until all GameServers have been switched from one version to another. 45 # "Recreate" terminates all non-allocated GameServers, and starts up a new set with the new details to replace them. 46 type: RollingUpdate 47 # Only relevant when `type: RollingUpdate` 48 rollingUpdate: 49 # the amount to increment the new GameServers by. Defaults to 25% 50 maxSurge: 25% 51 # the amount to decrements GameServers by. Defaults to 25% 52 maxUnavailable: 25% 53 # Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers exceeds 54 # the desired replicas in the underlying `GameServerSet` 55 allocationOverflow: 56 labels: 57 mykey: myvalue 58 version: "" # empty an existing label value 59 annotations: 60 otherkey: setthisvalue 61 # 62 # [Stage:Beta] 63 # [FeatureFlag:CountsAndLists] 64 # Which gameservers in the Fleet are most important to keep around - impacts scale down logic. 65 # Priority of sorting is in descending importance. I.e. The position 0 `priority` entry is checked first. 66 # Now in Beta, and enabled by default. 67 priorities: 68 - type: Counter # Whether a Counter or a List. 69 key: rooms # The name of the Counter or List. No impact if no GameServer found. 70 order: Ascending # Default is "Ascending" so smaller available capacity will be removed first on down scaling. 71 - type: List 72 key: players 73 order: Ascending 74 template: 75 # GameServer metadata 76 metadata: 77 labels: 78 foo: bar 79 # GameServer specification 80 spec: 81 ports: 82 - name: default 83 portPolicy: Dynamic 84 containerPort: 26000 85 health: 86 initialDelaySeconds: 30 87 periodSeconds: 60 88 # Parameters for game server sidecar 89 sdkServer: 90 # sdkServer log level parameter has three options: 91 # - "Info" (default) The SDK server will output all messages except for debug messages 92 # - "Debug" The SDK server will output all messages including debug messages 93 # - "Error" The SDK server will only output error messages 94 # - "Trace" The SDK server will output all messages, including detailed tracing information 95 logLevel: Info 96 # 97 # [Stage:Beta] 98 # [FeatureFlag:CountsAndLists] 99 # Counts and Lists provides the configuration for generic (player, room, session, etc.) tracking features. 100 # Now in Beta, and enabled by default. 101 counters: 102 rooms: 103 count: 0 # Initial Value. Count and/or capacity must be listed (but may be nil) otherwise the counter will by dropped by the CRD schema. 104 capacity: 10 105 lists: 106 players: 107 capacity: # Capacity and/or values must be listed (but may be nil) otherwise the list will be dropped by the CRD schema. 108 # The GameServer's Pod template 109 template: 110 spec: 111 containers: 112 - name: simple-game-server 113 image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.39