agones.dev/agones@v1.53.0/install/helm/agones/templates/crds/gameserverset.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  {{- if .Values.agones.crds.install }}
    16  
    17  apiVersion: apiextensions.k8s.io/v1
    18  kind: CustomResourceDefinition
    19  metadata:
    20    name: gameserversets.agones.dev
    21    labels:
    22      component: crd
    23      app: {{ template "agones.name" . }}
    24      chart: {{ template "agones.chart" . }}
    25      release: {{ .Release.Name }}
    26      heritage: {{ .Release.Service }}
    27  spec:
    28    group: agones.dev
    29    names:
    30      kind: GameServerSet
    31      plural: gameserversets
    32      shortNames:
    33        - gss
    34        - gsset
    35      singular: gameserverset
    36    scope: Namespaced
    37    versions:
    38      - name: v1
    39        served: true
    40        storage: true
    41        additionalPrinterColumns:
    42          - jsonPath: .spec.scheduling
    43            name: Scheduling
    44            type: string
    45          - jsonPath: .spec.replicas
    46            name: Desired
    47            type: integer
    48          - jsonPath: .status.replicas
    49            name: Current
    50            type: integer
    51          - jsonPath: .status.allocatedReplicas
    52            name: Allocated
    53            type: integer
    54          - jsonPath: .status.readyReplicas
    55            name: Ready
    56            type: integer
    57          - jsonPath: .metadata.creationTimestamp
    58            name: Age
    59            type: date
    60        schema:
    61          openAPIV3Schema:
    62            description: 'GameServerSet is the data structure for a set of GameServers.'
    63            type: object
    64            properties:
    65              spec:
    66                description: 'GameServerSetSpec the specification for GameServerSet. More info:
    67                  https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
    68                type: object
    69                required:
    70                  - replicas
    71                  - template
    72                properties:
    73                  replicas:
    74                    type: integer
    75                    minimum: 0
    76                  allocationOverflow:
    77                    type: object
    78                    nullable: true
    79                    properties:
    80                      labels:
    81                        type: object
    82                        additionalProperties:
    83                          type: string
    84                      annotations:
    85                        type: object
    86                        additionalProperties:
    87                          type: string
    88                  scheduling:
    89                    type: string
    90                    enum:
    91                      - Packed
    92                      - Distributed
    93                  priorities:
    94                    type: array
    95                    description: Configuration of Counters and Lists scale down logic. Priorities in the gameserverset.yaml file must be identical to the structure of priorities in fleet.yaml.
    96                    nullable: true
    97                    items:
    98                      type: object
    99                      properties:
   100                        type:
   101                          type: string
   102                          description: Whether a Counter or a List.
   103                          enum:
   104                            - Counter
   105                            - List
   106                        key:
   107                          type: string
   108                          description: The name of the Counter or List
   109                        order:
   110                          type: string
   111                          description: Ascending or Descending sort order
   112                          enum:
   113                            - Ascending
   114                            - Descending
   115                  template:
   116                    {{- $data := dict 
   117                      "metadata" true 
   118                      "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields
   119                      "lists" .Values.gameservers.lists
   120                    }}
   121                    {{- include "gameserver.schema" $data | indent 18 }}
   122              status:
   123                description: 'GameServerSetStatus is the status of a GameServerSet. More info:
   124                  https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.GameServerSet'
   125                type: object
   126                properties:
   127                  replicas:
   128                    type: integer
   129                    minimum: 0
   130                  readyReplicas:
   131                    type: integer
   132                    minimum: 0
   133                  reservedReplicas:
   134                    type: integer
   135                    minimum: 0
   136                  allocatedReplicas:
   137                    type: integer
   138                    minimum: 0
   139                  shutdownReplicas:
   140                    type: integer
   141                    minimum: 0
   142                  players:
   143                    type: object
   144                    nullable: true
   145                    properties:
   146                      count:
   147                        type: integer
   148                        minimum: 0
   149                      capacity:
   150                        type: integer
   151                        minimum: 0
   152                  counters:
   153                    type: object
   154                    title: Map of player, room, session, etc. counters
   155                    nullable: true
   156                    maxProperties: 1000
   157                    additionalProperties:
   158                      type: object
   159                      properties:
   160                        allocatedCount: # Aggregated count of the Counter across allocated GameServers in the GameServerSet
   161                          type: integer
   162                          minimum: 0
   163                        allocatedCapacity: # Aggregated maximum capacity of the Counter across allocated GameServers in the GameServerSet
   164                          type: integer
   165                          minimum: 0
   166                        count: # Aggregated count of the Counter across the GameServerSet
   167                          type: integer
   168                          default: 0
   169                          minimum: 0
   170                        capacity: # Aggregated maximum capacity of the Counter across the GameServerSet
   171                          type: integer
   172                          minimum: 0
   173                  lists:
   174                    type: object
   175                    title: Map of player, room, session, etc. lists
   176                    nullable: true
   177                    maxProperties: 1000
   178                    additionalProperties:
   179                      type: object
   180                      properties:
   181                        allocatedCount: # Aggregated number of items in the List across allocated GameServers in the GameServerSet
   182                          type: integer
   183                          minimum: 0
   184                        allocatedCapacity: # Aggregated maximum capacity of the List across allocated GameServers in the GameServerSet
   185                          type: integer
   186                          minimum: 0
   187                        count: # Aggregated number of items in the List across the GameServerSet
   188                          type: integer
   189                          default: 0
   190                          minimum: 0
   191                        capacity: # Aggregated maximum capacity of the List across the GameServerSet
   192                          type: integer
   193                          minimum: 0
   194        subresources:
   195          # status enables the status subresource.
   196          status: { }
   197          # scale enables the scale subresource.
   198          scale:
   199            # specReplicasPath defines the jsonPath inside of a custom resource that corresponds to Scale.Spec.Replicas.
   200            specReplicasPath: .spec.replicas
   201            # statusReplicasPath defines the jsonPath inside of a custom resource that corresponds to Scale.Status.Replicas.
   202            statusReplicasPath: .status.replicas
   203            # labelSelectorPath defines the jsonPath inside of a custom resource that corresponds to Scale.Status.Selector.
   204            labelSelectorPath: .status.labelSelector
   205  {{- end }}