---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: meshgatewayconfigs.kuma.io
spec:
  group: kuma.io
  names:
    categories:
    - kuma
    kind: MeshGatewayConfig
    listKind: MeshGatewayConfigList
    plural: meshgatewayconfigs
    singular: meshgatewayconfig
  scope: Cluster
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: |-
          MeshGatewayConfig holds the configuration of a MeshGateway. A
          GatewayClass can refer to a MeshGatewayConfig via parametersRef.
        properties:
          apiVersion:
            description: |-
              APIVersion defines the versioned schema of this representation of an object.
              Servers should convert recognized schemas to the latest internal value, and
              may reject unrecognized values.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
            type: string
          kind:
            description: |-
              Kind is a string value representing the REST resource this object represents.
              Servers may infer this from the endpoint the client submits requests to.
              Cannot be updated.
              In CamelCase.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
            type: string
          metadata:
            type: object
          spec:
            description: MeshGatewayConfigSpec specifies the options available for
              a Kuma MeshGateway.
            properties:
              crossMesh:
                description: |-
                  CrossMesh specifies whether listeners configured by this gateway are
                  cross mesh listeners.
                type: boolean
              podTemplate:
                description: PodTemplate configures the Pod owned by this config.
                properties:
                  metadata:
                    description: Metadata holds metadata configuration for a Service.
                    properties:
                      annotations:
                        additionalProperties:
                          type: string
                        description: Annotations holds annotations to be set on an
                          object.
                        type: object
                      labels:
                        additionalProperties:
                          type: string
                        description: Labels holds labels to be set on an objects.
                        type: object
                    type: object
                  spec:
                    description: Spec holds some customizable fields of a Pod.
                    properties:
                      container:
                        description: Container corresponds to PodSpec.Container
                        properties:
                          securityContext:
                            description: ContainerSecurityContext corresponds to PodSpec.Container.SecurityContext
                            properties:
                              readOnlyRootFilesystem:
                                description: ReadOnlyRootFilesystem corresponds to
                                  PodSpec.Container.SecurityContext.ReadOnlyRootFilesystem
                                type: boolean
                            type: object
                        type: object
                      securityContext:
                        description: PodSecurityContext corresponds to PodSpec.SecurityContext
                        properties:
                          fsGroup:
                            description: FSGroup corresponds to PodSpec.SecurityContext.FSGroup
                            format: int64
                            type: integer
                        type: object
                      serviceAccountName:
                        description: ServiceAccountName corresponds to PodSpec.ServiceAccountName.
                        type: string
                    type: object
                type: object
              replicas:
                default: 1
                description: |-
                  Replicas is the number of dataplane proxy replicas to create. For
                  now this is a fixed number, but in the future it could be
                  automatically scaled based on metrics.
                format: int32
                minimum: 1
                type: integer
              resources:
                description: |-
                  Resources specifies the compute resources for the proxy container.
                  The default can be set in the control plane config.
                properties:
                  claims:
                    description: |-
                      Claims lists the names of resources, defined in spec.resourceClaims,
                      that are used by this container.

                      This field depends on the
                      DynamicResourceAllocation feature gate.

                      This field is immutable. It can only be set for containers.
                    items:
                      description: ResourceClaim references one entry in PodSpec.ResourceClaims.
                      properties:
                        name:
                          description: |-
                            Name must match the name of one entry in pod.spec.resourceClaims of
                            the Pod where this field is used. It makes that resource available
                            inside a container.
                          type: string
                        request:
                          description: |-
                            Request is the name chosen for a request in the referenced claim.
                            If empty, everything from the claim is made available, otherwise
                            only the result of this request.
                          type: string
                      required:
                      - name
                      type: object
                    type: array
                    x-kubernetes-list-map-keys:
                    - name
                    x-kubernetes-list-type: map
                  limits:
                    additionalProperties:
                      anyOf:
                      - type: integer
                      - type: string
                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                      x-kubernetes-int-or-string: true
                    description: |-
                      Limits describes the maximum amount of compute resources allowed.
                      More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
                    type: object
                  requests:
                    additionalProperties:
                      anyOf:
                      - type: integer
                      - type: string
                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                      x-kubernetes-int-or-string: true
                    description: |-
                      Requests describes the minimum amount of compute resources required.
                      If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
                      otherwise to an implementation-defined value. Requests cannot exceed Limits.
                      More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
                    type: object
                type: object
              serviceTemplate:
                description: ServiceTemplate configures the Service owned by this
                  config.
                properties:
                  metadata:
                    description: Metadata holds metadata configuration for a Service.
                    properties:
                      annotations:
                        additionalProperties:
                          type: string
                        description: Annotations holds annotations to be set on an
                          object.
                        type: object
                      labels:
                        additionalProperties:
                          type: string
                        description: Labels holds labels to be set on an objects.
                        type: object
                    type: object
                  spec:
                    description: Spec holds some customizable fields of a Service.
                    properties:
                      loadBalancerIP:
                        description: LoadBalancerIP corresponds to ServiceSpec.LoadBalancerIP.
                        type: string
                    type: object
                type: object
              serviceType:
                default: LoadBalancer
                description: |-
                  ServiceType specifies the type of managed Service that will be
                  created to expose the dataplane proxies to traffic from outside
                  the cluster. The ports to expose will be taken from the matching Gateway
                  resource. If there is no matching Gateway, the managed Service will
                  be deleted.
                enum:
                - LoadBalancer
                - ClusterIP
                - NodePort
                type: string
              tags:
                additionalProperties:
                  type: string
                description: |-
                  Tags specifies a set of Kuma tags that are included in the
                  MeshGatewayInstance and thus propagated to every Dataplane generated to
                  serve the MeshGateway.
                  These tags should include a maximum of one `kuma.io/service` tag.
                type: object
            type: object
          status:
            description: |-
              MeshGatewayConfigStatus holds information about the status of the gateway
              instance.
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
