-
Notifications
You must be signed in to change notification settings - Fork 778
/
fleet.yaml
218 lines (216 loc) · 8.5 KB
/
fleet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Copyright 2018 Google LLC All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.agones.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: fleets.agones.dev
labels:
component: crd
app: {{ template "agones.name" . }}
chart: {{ template "agones.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
group: agones.dev
names:
kind: Fleet
plural: fleets
shortNames:
- flt
singular: fleet
scope: Namespaced
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- jsonPath: .spec.scheduling
name: Scheduling
type: string
- jsonPath: .spec.replicas
name: Desired
type: integer
- jsonPath: .status.replicas
name: Current
type: integer
- jsonPath: .status.allocatedReplicas
name: Allocated
type: integer
- jsonPath: .status.readyReplicas
name: Ready
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
schema:
openAPIV3Schema:
description: 'Fleet is the data structure for a Fleet resource'
type: object
properties:
spec:
description: 'FleetSpec is the spec for a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
required:
- template
properties:
replicas:
type: integer
minimum: 0
allocationOverflow:
type: object
nullable: true
properties:
labels:
type: object
additionalProperties:
type: string
annotations:
type: object
additionalProperties:
type: string
scheduling:
type: string
enum:
- Packed
- Distributed
strategy:
type: object
properties:
type:
type: string
enum:
- Recreate
- RollingUpdate
rollingUpdate:
type: object
nullable: true
properties:
maxSurge:
x-kubernetes-int-or-string: true
anyOf:
- type: integer
- type: string
maxUnavailable:
x-kubernetes-int-or-string: true
anyOf:
- type: integer
- type: string
priorities:
type: array
description: Configuration of Counters and Lists scale down logic -- which gameservers in the Fleet are most important to keep around.
nullable: true
items:
type: object
properties:
type:
type: string
description: Whether a Counter or a List.
enum:
- Counter
- List
key:
type: string
description: The name of the Counter or List. If not found on the GameServer, those GameServer with the key will have priority over those that do not.
order:
type: string
description: Ascending or Descending sort order. Default is "Ascending" so remove smaller total capacity first. "Descending" would remove larger total capacity first.
enum:
- Ascending
- Descending
template:
{{- $data := dict "metadata" true "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields }}
{{- include "gameserver.schema" $data | indent 17 }}
status:
description: 'FleetStatus is the status of a Fleet. More info:
https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
type: object
properties:
replicas:
type: integer
minimum: 0
readyReplicas:
type: integer
minimum: 0
reservedReplicas:
type: integer
minimum: 0
allocatedReplicas:
type: integer
minimum: 0
players:
type: object
nullable: true
properties:
count:
type: integer
minimum: 0
capacity:
type: integer
minimum: 0
counters:
type: object
title: Map of player, room, session, etc. counters
nullable: true
maxProperties: 1000
additionalProperties:
type: object
properties:
allocatedCount: # Aggregated count of the Counter across allocated GameServers in the Fleet
type: integer
minimum: 0
allocatedCapacity: # Aggregated maximum capacity of the Counter across allocated GameServers in the Fleet
type: integer
minimum: 0
count: # Aggregated count of the Counter across the Fleet
type: integer
default: 0
minimum: 0
capacity: # Aggregated maximum capacity of the Counter across the Fleet
type: integer
minimum: 0
lists:
type: object
title: Map of player, room, session, etc. lists
nullable: true
maxProperties: 1000
additionalProperties:
type: object
properties:
allocatedCount: # Aggregated number of items in the List across allocated GameServers in the Fleet
type: integer
minimum: 0
allocatedCapacity: # Aggregated maximum capacity of the List across allocated GameServers in the Fleet
type: integer
minimum: 0
count: # Aggregated number of items in the List across the Fleet
type: integer
default: 0
minimum: 0
capacity: # Aggregated maximum capacity of the List across the Fleet
type: integer
minimum: 0
subresources:
# status enables the status subresource.
status: { }
# scale enables the scale subresource.
scale:
# specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas.
specReplicasPath: .spec.replicas
# statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas.
statusReplicasPath: .status.replicas
# labelSelectorPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Selector.
labelSelectorPath: .status.labelSelector
{{- end }}