---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.3
  name: meshservices.kuma.io
spec:
  group: kuma.io
  names:
    categories:
    - kuma
    kind: MeshService
    listKind: MeshServiceList
    plural: meshservices
    singular: meshservice
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.addresses[0].hostname
      name: Hostname
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        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: Spec is the specification of the Kuma MeshService resource.
            properties:
              identities:
                items:
                  properties:
                    type:
                      enum:
                      - ServiceTag
                      type: string
                    value:
                      type: string
                  required:
                  - type
                  - value
                  type: object
                type: array
              ports:
                items:
                  properties:
                    appProtocol:
                      default: tcp
                      description: Protocol identifies a protocol supported by a service.
                      type: string
                    name:
                      type: string
                    port:
                      format: int32
                      type: integer
                    targetPort:
                      anyOf:
                      - type: integer
                      - type: string
                      x-kubernetes-int-or-string: true
                  required:
                  - port
                  type: object
                type: array
                x-kubernetes-list-map-keys:
                - port
                - appProtocol
                x-kubernetes-list-type: map
              selector:
                properties:
                  dataplaneRef:
                    properties:
                      name:
                        type: string
                    type: object
                  dataplaneTags:
                    additionalProperties:
                      type: string
                    type: object
                type: object
              state:
                description: |-
                  State of MeshService. Available if there is at least one healthy endpoint. Otherwise, Unavailable.
                  It's used for cross zone communication to check if we should send traffic to it, when MeshService is aggregated into MeshMultiZoneService.
                enum:
                - Available
                - Unavailable
                type: string
            type: object
          status:
            description: Status is the current status of the Kuma MeshService resource.
            properties:
              addresses:
                items:
                  properties:
                    hostname:
                      type: string
                    hostnameGeneratorRef:
                      properties:
                        coreName:
                          type: string
                      required:
                      - coreName
                      type: object
                    origin:
                      type: string
                  type: object
                type: array
              dataplaneProxies:
                description: Data plane proxies statistics selected by this MeshService.
                properties:
                  connected:
                    description: Number of data plane proxies connected to the zone
                      control plane
                    type: integer
                  healthy:
                    description: Number of data plane proxies with all healthy inbounds
                      selected by this MeshService.
                    type: integer
                  total:
                    description: Total number of data plane proxies.
                    type: integer
                type: object
              hostnameGenerators:
                items:
                  properties:
                    conditions:
                      description: Conditions is an array of hostname generator conditions.
                      items:
                        properties:
                          message:
                            description: |-
                              message is a human readable message indicating details about the transition.
                              This may be an empty string.
                            maxLength: 32768
                            type: string
                          reason:
                            description: |-
                              reason contains a programmatic identifier indicating the reason for the condition's last transition.
                              Producers of specific condition types may define expected values and meanings for this field,
                              and whether the values are considered a guaranteed API.
                              The value should be a CamelCase string.
                              This field may not be empty.
                            maxLength: 1024
                            minLength: 1
                            pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
                            type: string
                          status:
                            description: status of the condition, one of True, False,
                              Unknown.
                            enum:
                            - "True"
                            - "False"
                            - Unknown
                            type: string
                          type:
                            description: type of condition in CamelCase or in foo.example.com/CamelCase.
                            maxLength: 316
                            pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
                            type: string
                        required:
                        - message
                        - reason
                        - status
                        - type
                        type: object
                      type: array
                      x-kubernetes-list-map-keys:
                      - type
                      x-kubernetes-list-type: map
                    hostnameGeneratorRef:
                      properties:
                        coreName:
                          type: string
                      required:
                      - coreName
                      type: object
                  required:
                  - hostnameGeneratorRef
                  type: object
                type: array
              tls:
                properties:
                  status:
                    enum:
                    - Ready
                    - NotReady
                    type: string
                type: object
              vips:
                items:
                  properties:
                    ip:
                      type: string
                  type: object
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
