agones.dev/agones@v1.53.0/install/helm/agones/templates/crds/fleet.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: fleets.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: Fleet
    31      plural: fleets
    32      shortNames:
    33        - flt
    34      singular: fleet
    35    scope: Namespaced
    36    versions:
    37      - name: v1
    38        served: true
    39        storage: true
    40        additionalPrinterColumns:
    41          - jsonPath: .spec.scheduling
    42            name: Scheduling
    43            type: string
    44          - jsonPath: .spec.replicas
    45            name: Desired
    46            type: integer
    47          - jsonPath: .status.replicas
    48            name: Current
    49            type: integer
    50          - jsonPath: .status.allocatedReplicas
    51            name: Allocated
    52            type: integer
    53          - jsonPath: .status.readyReplicas
    54            name: Ready
    55            type: integer
    56          - jsonPath: .metadata.creationTimestamp
    57            name: Age
    58            type: date
    59        schema:
    60          openAPIV3Schema:
    61            description: 'Fleet is the data structure for a Fleet resource'
    62            type: object
    63            properties:
    64              spec:
    65                description: 'FleetSpec is the spec for a Fleet. More info:
    66                  https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
    67                type: object
    68                required:
    69                  - template
    70                properties:
    71                  replicas:
    72                    type: integer
    73                    minimum: 0
    74                  allocationOverflow:
    75                    type: object
    76                    nullable: true
    77                    properties:
    78                      labels:
    79                        type: object
    80                        additionalProperties:
    81                          type: string
    82                      annotations:
    83                        type: object
    84                        additionalProperties:
    85                          type: string
    86                  scheduling:
    87                    type: string
    88                    enum:
    89                      - Packed
    90                      - Distributed
    91                  strategy:
    92                    type: object
    93                    properties:
    94                      type:
    95                        type: string
    96                        enum:
    97                          - Recreate
    98                          - RollingUpdate
    99                      rollingUpdate:
   100                        type: object
   101                        nullable: true
   102                        properties:
   103                          maxSurge:
   104                            x-kubernetes-int-or-string: true
   105                            anyOf:
   106                              - type: integer
   107                              - type: string
   108                          maxUnavailable:
   109                            x-kubernetes-int-or-string: true
   110                            anyOf:
   111                              - type: integer
   112                              - type: string
   113                  priorities:
   114                    type: array
   115                    description: Configuration of Counters and Lists scale down logic -- which gameservers in the Fleet are most important to keep around.
   116                    nullable: true
   117                    items:
   118                      type: object
   119                      properties:
   120                        type:
   121                          type: string
   122                          description: Whether a Counter or a List.
   123                          enum:
   124                            - Counter
   125                            - List
   126                        key:
   127                          type: string
   128                          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.
   129                        order:
   130                          type: string
   131                          description: Ascending or Descending sort order. Default is "Ascending" so remove smaller available capacity first. "Descending" would remove larger available capacity first.
   132                          default: Ascending
   133                          enum:
   134                            - Ascending
   135                            - Descending
   136                  template:
   137                    {{- $data := dict 
   138                      "metadata" true 
   139                      "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields
   140                      "lists" .Values.gameservers.lists
   141                    }}
   142                    {{- include "gameserver.schema" $data | indent 17 }}
   143              status:
   144                description: 'FleetStatus is the status of a Fleet. More info:
   145                  https://agones.dev/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.Fleet'
   146                type: object
   147                properties:
   148                  replicas:
   149                    type: integer
   150                    minimum: 0
   151                  readyReplicas:
   152                    type: integer
   153                    minimum: 0
   154                  reservedReplicas:
   155                    type: integer
   156                    minimum: 0
   157                  allocatedReplicas:
   158                    type: integer
   159                    minimum: 0
   160                  players:
   161                    type: object
   162                    nullable: true
   163                    properties:
   164                      count:
   165                        type: integer
   166                        minimum: 0
   167                      capacity:
   168                        type: integer
   169                        minimum: 0
   170                  counters:
   171                    type: object
   172                    title: Map of player, room, session, etc. counters
   173                    nullable: true
   174                    maxProperties: 1000
   175                    additionalProperties:
   176                      type: object
   177                      properties:
   178                        allocatedCount: # Aggregated count of the Counter across allocated GameServers in the Fleet
   179                          type: integer
   180                          minimum: 0
   181                        allocatedCapacity: # Aggregated maximum capacity of the Counter across allocated GameServers in the Fleet
   182                          type: integer
   183                          minimum: 0
   184                        count: # Aggregated count of the Counter across the Fleet
   185                          type: integer
   186                          default: 0
   187                          minimum: 0
   188                        capacity: # Aggregated maximum capacity of the Counter across the Fleet
   189                          type: integer
   190                          minimum: 0
   191                  lists:
   192                    type: object
   193                    title: Map of player, room, session, etc. lists
   194                    nullable: true
   195                    maxProperties: 1000
   196                    additionalProperties:
   197                      type: object
   198                      properties:
   199                        allocatedCount: # Aggregated number of items in the List across allocated GameServers in the Fleet
   200                          type: integer
   201                          minimum: 0
   202                        allocatedCapacity: # Aggregated maximum capacity of the List across allocated GameServers in the Fleet
   203                          type: integer
   204                          minimum: 0
   205                        count: # Aggregated number of items in the List across the Fleet
   206                          type: integer
   207                          default: 0
   208                          minimum: 0
   209                        capacity: # Aggregated maximum capacity of the List across the Fleet
   210                          type: integer
   211                          minimum: 0
   212        subresources:
   213          # status enables the status subresource.
   214          status: { }
   215          # scale enables the scale subresource.
   216          scale:
   217            # specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas.
   218            specReplicasPath: .spec.replicas
   219            # statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas.
   220            statusReplicasPath: .status.replicas
   221            # labelSelectorPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Selector.
   222            labelSelectorPath: .status.labelSelector
   223  {{- end }}