apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: serviceimports.lighthouse.submariner.io
  ownerReferences:
  - apiVersion: apiextensions.k8s.io/v1beta1
    controller: true
    blockOwnerDeletion: true
    kind: CustomResourceDefinition
    name: submarinerconfigs.submarineraddon.open-cluster-management.io
    uid: {{ .ConfigCRDUID }}
spec:
  group: lighthouse.submariner.io
  names:
    kind: ServiceImport
    listKind: ServiceImportList
    plural: serviceimports
    singular: serviceimport
  scope: Namespaced
  versions:
  - name: v2alpha1
    schema:
      openAPIV3Schema:
        description: ServiceImport describes a service imported from clusters in a
          clusterset.
        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: ServiceImportSpec describes an imported service and the information
              necessary to consume it.
            properties:
              ip:
                type: string
              ports:
                items:
                  description: ServicePort represents the port on which the service
                    is exposed
                  properties:
                    appProtocol:
                      description: The application protocol for this port. This field
                        follows standard Kubernetes label syntax. Un-prefixed names
                        are reserved for IANA standard service names (as per RFC-6335
                        and http://www.iana.org/assignments/service-names). Non-standard
                        protocols should use prefixed names such as mycompany.com/my-custom-protocol.
                        Field can be enabled with ServiceAppProtocol feature gate.
                      type: string
                    name:
                      description: The name of this port within the service. This
                        must be a DNS_LABEL. All ports within a ServiceSpec must have
                        unique names. When considering the endpoints for a Service,
                        this must match the 'name' field in the EndpointPort. Optional
                        if only one ServicePort is defined on this service.
                      type: string
                    port:
                      description: The port that will be exposed by this service.
                      format: int32
                      type: integer
                    protocol:
                      description: The IP protocol for this port. Supports "TCP",
                        "UDP", and "SCTP". Default is TCP.
                      type: string
                  required:
                  - port
                  type: object
                type: array
                x-kubernetes-list-type: atomic
              sessionAffinity:
                description: Session Affinity Type string
                type: string
              sessionAffinityConfig:
                description: SessionAffinityConfig represents the configurations of
                  session affinity.
                properties:
                  clientIP:
                    description: clientIP contains the configurations of Client IP
                      based session affinity.
                    properties:
                      timeoutSeconds:
                        description: timeoutSeconds specifies the seconds of ClientIP
                          type session sticky time. The value must be >0 && <=86400(for
                          1 day) if ServiceAffinity == "ClientIP". Default value is
                          10800(for 3 hours).
                        format: int32
                        type: integer
                    type: object
                type: object
              type:
                description: ServiceImportType designates the type of a ServiceImport
                type: string
            required:
            - ports
            type: object
          status:
            description: ServiceImportStatus describes derived state of an imported
              service.
            properties:
              clusters:
                items:
                  description: ClusterStatus contains service configuration mapped
                    to a specific source cluster
                  properties:
                    cluster:
                      type: string
                    ips:
                      description: The IP(s) of the service running in the cluster.  In
                        the case of a headless service, it is the list of pod IPs
                        that back the service.
                      items:
                        type: string
                      type: array
                  required:
                  - cluster
                  type: object
                type: array
                x-kubernetes-list-map-keys:
                - cluster
                x-kubernetes-list-type: map
            type: object
        type: object
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
