---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.2
  name: privatelinkservices.dedicated.regionalserver.tidbcloud.com
spec:
  group: dedicated.regionalserver.tidbcloud.com
  names:
    categories:
    - regionserver
    kind: PrivateLinkService
    listKind: PrivateLinkServiceList
    plural: privatelinkservices
    singular: privatelinkservice
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: PrivateLinkService is the Schema for the PrivateLinkService API
        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:
            properties:
              Connections:
                items:
                  properties:
                    endpoint:
                      type: string
                    ips:
                      description: |-
                        IPs is the ips of the endpoint, it is used to create dns record.
                        Used in Azure.
                      items:
                        type: string
                      type: array
                  required:
                  - endpoint
                  type: object
                type: array
              loadBalancers:
                items:
                  properties:
                    clusterId:
                      description: Is it necessary to add this field?
                      type: string
                    id:
                      type: string
                  required:
                  - clusterId
                  - id
                  type: object
                type: array
              provider:
                type: string
              region:
                type: string
              targetIPAddressType:
                description: |-
                  TargetIPAddressType is the Endpoint Service address capability managed by
                  the TiDB Group address workflow. Empty preserves the unmanaged IPv4 behavior.
                enum:
                - ipv4
                - dualstack
                type: string
              vpcRef:
                properties:
                  name:
                    type: string
                  namespace:
                    type: string
                required:
                - name
                - namespace
                type: object
            required:
            - loadBalancers
            - provider
            - region
            - vpcRef
            type: object
          status:
            properties:
              allowedPrincipals:
                items:
                  type: string
                type: array
              azurePrivateLinkServiceStatus:
                properties:
                  alias:
                    description: A globally unique DNS Name for your Private Link
                      Service. You can use this alias to request a connection to your
                      Private Link Service.
                    type: string
                  id:
                    type: string
                  name:
                    type: string
                  serviceDnsName:
                    type: string
                type: object
              connectionStatuses:
                items:
                  properties:
                    dnsName:
                      description: |-
                        DNSName is the dns name of the endpoint.
                        Used in GCP and Azure.
                      type: string
                    endpoint:
                      type: string
                    ipAddressType:
                      description: |-
                        EndpointIPAddressType is the address type observed on a consumer VPC endpoint.
                        It is separate from IPAddressType because a consumer endpoint may be IPv6-only,
                        while a managed PrivateLink Service target only supports IPv4 or dualstack.
                      enum:
                      - ipv4
                      - ipv6
                      - dualstack
                      type: string
                    ips:
                      description: |-
                        IPs is the ips of the endpoint, it is used to create dns record.
                        Used in Azure.
                      items:
                        type: string
                      type: array
                    message:
                      type: string
                    phase:
                      type: string
                  required:
                  - endpoint
                  - phase
                  type: object
                type: array
              dnsIdentify:
                type: string
              dnsStatus:
                properties:
                  name:
                    type: string
                  status:
                    type: string
                  type:
                    type: string
                  value:
                    type: string
                type: object
              endpointServices:
                properties:
                  availabilityZones:
                    items:
                      type: string
                    type: array
                  name:
                    type: string
                  port:
                    format: int32
                    type: integer
                  privateDnsName:
                    type: string
                  serviceId:
                    type: string
                  serviceName:
                    type: string
                type: object
              loadBalancerStatuses:
                items:
                  properties:
                    cloudResourceId:
                      type: string
                    host:
                      type: string
                    id:
                      type: string
                    phase:
                      type: string
                    port:
                      format: int32
                      type: integer
                    type:
                      type: string
                  type: object
                type: array
              message:
                type: string
              natSubnetStatus:
                properties:
                  ipCidrRange:
                    type: string
                  name:
                    type: string
                type: object
              phase:
                type: string
              serviceAttachmentStatus:
                properties:
                  connectDomain:
                    type: string
                  name:
                    type: string
                  port:
                    format: int32
                    type: integer
                  serviceAttachment:
                    type: string
                type: object
              verifyDnsOwnership:
                type: string
              vpcId:
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
