forked from dgkanatsios/azuregameserversscalingkubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdedicatedgameservercollection.yaml
72 lines (72 loc) · 2.41 KB
/
dedicatedgameservercollection.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
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: dedicatedgameservercollections.azuregaming.com
spec:
group: azuregaming.com
version: v1alpha1
scope: Namespaced
names:
kind: DedicatedGameServerCollection
plural: dedicatedgameservercollections
singular: dedicatedgameservercollection
shortNames:
- dgsc
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#subresources
subresources:
#status: {} # status enables the status subresource.
scale: # scale enables the scale subresource.
# 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.availableReplicas
additionalPrinterColumns:
- name: Replicas
type: string
description: number of requested replicas
JSONPath: .spec.replicas
- name: Available
type: string
description: number of available replicas
JSONPath: .status.availableReplicas
- name: DGSColHealth
type: string
description: health of the game server collection
JSONPath: .status.dgsHealth
- name: PodCollectionState
type: string
description: state of the game server collection's pods
JSONPath: .status.podsState
validation:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
properties:
spec:
properties:
Replicas:
type: integer
minimum: 1
maximum: 100
DGSActivePlayersAutoScalerDetails:
type: object
properties:
MinimumReplicas:
type: integer
MaximumReplicas:
type: integer
ScaleInThreshold:
type: integer
minimum: 1
maximum: 100
ScaleOutThreshold:
type: integer
minimum: 1
maximum: 100
Enabled:
type: boolean
CoolDownInMinutes:
type: integer
LastScaleOperationDateTime:
type: string
MaxPlayersPerServer:
type: integer