agones.dev/agones@v1.53.0/install/helm/agones/templates/crds/_gameserverspecschema.yaml (about) 1 # Copyright 2018 Google LLC All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 {{/* schema for a gameserver spec */}} 16 {{- define "gameserver.schema" }} 17 description: 'GameServer is the data structure for a GameServer resource.' 18 type: object 19 required: 20 - spec 21 properties: 22 {{- if .metadata | default false }} 23 metadata: 24 {{- include "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" . | indent 4 }} 25 {{- end}} 26 spec: 27 description: 'GameServerSpec is the spec for a GameServer resource. More info: 28 https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServer' 29 type: object 30 required: 31 - template 32 properties: 33 template: 34 {{- if .podPreserveUnknownFields }} 35 x-kubernetes-preserve-unknown-fields: true 36 {{- end }} 37 {{- include "io.k8s.api.core.v1.PodTemplateSpec" . | indent 8 }} 38 container: 39 title: The container name running the gameserver 40 description: if there is more than one container, specify which one is the game server 41 type: string 42 minLength: 0 43 maxLength: 63 44 pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" 45 ports: 46 title: array of ports to expose on the game server container 47 type: array 48 nullable: true 49 items: 50 type: object 51 properties: 52 name: 53 title: Name is the descriptive name of the port 54 type: string 55 range: 56 title: the port range name from which to select a port when using a 'Dynamic' or 'Passthrough' port policy. Defaults to 'default'. 57 type: string 58 portPolicy: 59 title: the port policy that will be applied to the game server 60 description: | 61 portPolicy has four options: 62 - "Dynamic" (default) the system allocates a random free hostPort for the gameserver, for game clients to connect to 63 - "Static", user defines the hostPort that the game client will connect to. Then onus is on the user to ensure that the 64 port is available. When static is the policy specified, `hostPort` is required to be populated 65 - "Passthrough" dynamically sets the `containerPort` to the same value as the dynamically selected hostPort. 66 This will mean that users will need to lookup what port has been opened through the server side SDK. 67 - "None" means the `hostPort` is ignored and if defined, the `containerPort` (optional) is used to set the port on the GameServer instance. 68 type: string 69 enum: 70 - Dynamic 71 - Static 72 - Passthrough 73 - None 74 protocol: 75 title: Protocol being used. Defaults to UDP. TCP and TCPUDP are other options. 76 type: string 77 enum: 78 - UDP 79 - TCP 80 - TCPUDP 81 container: 82 title: | 83 Container is the name of the container on which to open the port. Defaults to the game server container. 84 type: string 85 containerPort: 86 title: The port that is being opened on the game server process 87 type: integer 88 minimum: 1 89 maximum: 65535 90 hostPort: 91 title: The port exposed on the host 92 description: Only required when `portPolicy` is "Static". Overwritten when portPolicy is "Dynamic" or "Passthrough". 93 type: integer 94 minimum: 1 95 maximum: 65535 96 sdkServer: 97 type: object 98 title: Parameters for the SDK Server (sidecar) 99 properties: 100 logLevel: 101 type: string 102 description: | 103 sdkServer log level parameter has three options: 104 - "Info" (default) The SDK server will output all messages except for debug messages 105 - "Debug" The SDK server will output all messages including debug messages 106 - "Error" The SDK server will only output error messages 107 - "Trace" The SDK server will output all messages, including detailed tracing information 108 enum: 109 - Error 110 - Info 111 - Debug 112 - Trace 113 grpcPort: 114 title: The port on which the SDK server binds the gRPC server to accept incoming connections 115 description: | 116 Starting with Agones 1.2 the default gRPC port is 9357. In earlier releases, the default was 59357. 117 type: integer 118 minimum: 1 119 maximum: 65535 120 httpPort: 121 title: The port on which the SDK server binds the HTTP gRPC gateway server to accept incoming connections 122 description: | 123 Starting with Agones 1.2 the default HTTP port is 9358. In earlier releases, the default was 59358. 124 type: integer 125 minimum: 1 126 maximum: 65535 127 scheduling: 128 type: string 129 enum: 130 - Packed 131 - Distributed 132 health: 133 type: object 134 title: Health checking for the running game server 135 properties: 136 disabled: 137 title: Disable health checking. defaults to false, but can be set to true 138 type: boolean 139 initialDelaySeconds: 140 title: Number of seconds after the container has started before health check is initiated. Defaults to 5 seconds 141 type: integer 142 minimum: 0 143 maximum: 2147483648 144 periodSeconds: 145 title: How long before the server is considered not healthy 146 type: integer 147 minimum: 0 148 maximum: 2147483648 149 failureThreshold: 150 title: Minimum consecutive failures for the health probe to be considered failed after having succeeded. 151 type: integer 152 minimum: 1 153 maximum: 2147483648 154 players: 155 type: object 156 title: Configuration of player capacity 157 nullable: true 158 properties: 159 initialCapacity: 160 type: integer 161 title: The initial player capacity of this Game Server 162 minimum: 0 163 counters: 164 type: object 165 title: Map of player, room, session, etc. counters 166 nullable: true 167 maxProperties: 1000 168 additionalProperties: 169 type: object 170 properties: 171 count: 172 title: Initial count value 173 type: integer 174 default: 0 175 minimum: 0 176 capacity: 177 title: Max capacity of the counter 178 type: integer 179 default: 1000 180 minimum: 0 181 lists: 182 type: object 183 title: Map of player, room, session, etc. lists 184 nullable: true 185 maxProperties: 1000 186 additionalProperties: 187 type: object 188 properties: 189 capacity: 190 type: integer 191 title: Max capacity of the array (can be less than or equal to value of maxItems) 192 minimum: 0 193 default: 1000 194 maximum: {{ .lists.maxItems }} # must be equal to values.maxItems 195 values: 196 title: set of all the items in the list 197 type: array 198 x-kubernetes-list-type: set # Requires items in the array to be unique 199 maxItems: {{ .lists.maxItems }} # max possible size of the value array (cannot be updated) 200 items: # name of the item (player1, session1, room1, etc.) 201 type: string 202 default: [] 203 eviction: 204 type: object 205 title: Eviction tolerance of the game server 206 properties: 207 safe: 208 type: string 209 title: Game server supports termination via SIGTERM 210 description: | 211 - Never: The game server should run to completion. Agones sets Pod annotation `cluster-autoscaler.kubernetes.io/safe-to-evict: "false"` and label `agones.dev/safe-to-evict: "false"`, which matches a restrictive PodDisruptionBudget. 212 - OnUpgrade: On SIGTERM, the game server will exit within `terminationGracePeriodSeconds` or be terminated; Agones sets Pod annotation `cluster-autoscaler.kubernetes.io/safe-to-evict: "false"`, which blocks evictions by Cluster Autoscaler. Evictions from node upgrades proceed normally. 213 - Always: On SIGTERM, the game server will exit within `terminationGracePeriodSeconds` or be terminated, typically within 10m; Agones sets Pod annotation `cluster-autoscaler.kubernetes.io/safe-to-evict: "true"`, which allows evictions by Cluster Autoscaler. 214 enum: 215 - Always 216 - OnUpgrade 217 - Never 218 immutableReplicas: 219 type: integer 220 title: Immutable count of Pods to a GameServer. Always 1. (Implementation detail of implementing the Scale subresource.) 221 default: 1 222 minimum: 1 223 maximum: 1 224 {{- end }}