agones.dev/agones@v1.53.0/install/helm/agones/templates/crds/gameserver.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: gameservers.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: GameServer
    31      plural: gameservers
    32      shortNames:
    33        - gs
    34      singular: gameserver
    35    scope: Namespaced
    36    versions:
    37      - name: v1
    38        served: true
    39        storage: true
    40        additionalPrinterColumns:
    41          - jsonPath: .status.state
    42            name: State
    43            type: string
    44          - jsonPath: .status.address
    45            name: Address
    46            type: string
    47          - jsonPath: .status.ports[0].port
    48            name: Port
    49            type: string
    50          - jsonPath: .status.nodeName
    51            name: Node
    52            type: string
    53          - jsonPath: .metadata.creationTimestamp
    54            name: Age
    55            type: date
    56        schema:
    57          openAPIV3Schema:
    58            {{- $data := dict 
    59              "podPreserveUnknownFields" .Values.gameservers.podPreserveUnknownFields 
    60              "lists" .Values.gameservers.lists
    61            }}
    62            {{- include "gameserver.schema" $data | indent 9 }}{{- /* include the schema then status, as it's easier to align */ -}}
    63            {{- include "gameserver.status" $data | indent 11 }}
    64        subresources:
    65          # scale enables the scale subresource. We can't actually scale GameServers, but this allows
    66          # for the use of PodDisruptionBudget (PDB) without having to use a PDB per Pod.
    67          scale:
    68            # specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas.
    69            specReplicasPath: .spec.immutableReplicas
    70            # statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas.
    71            statusReplicasPath: .status.immutableReplicas
    72  {{- end }}