---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.4
  name: sinkendpoints.cdc.tidbcloud.com
spec:
  group: cdc.tidbcloud.com
  names:
    kind: SinkEndpoint
    listKind: SinkEndpointList
    plural: sinkendpoints
    singular: sinkendpoint
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: SinkEndpoint is the Schema for the sinkendpoints 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:
            description: SinkEndpointSpec defines the desired state of SinkEndpoint.
            properties:
              appBoxID:
                description: AppBoxID is the target appbox id
                type: string
              availabilityZones:
                description: AvailabilityZones is physical azs where the endpoint
                  is created in if DNSRecords are not specified.
                items:
                  type: string
                type: array
              dnsRecords:
                description: DNSRecords is the list of DNS records to be created
                items:
                  description: DNSRecord defines the desired DNS record to be attached
                    to the az
                  properties:
                    availabilityZone:
                      type: string
                    recordName:
                      type: string
                  required:
                  - availabilityZone
                  - recordName
                  type: object
                type: array
              rootDomainName:
                description: RootDomainName is the root domain name
                type: string
              serviceName:
                description: ServiceName is the target service name
                type: string
            required:
            - appBoxID
            - rootDomainName
            - serviceName
            type: object
          status:
            description: SinkEndpointStatus defines the observed state of SinkEndpoint.
            properties:
              cloudAccountID:
                type: string
              endpointAddress:
                type: string
              endpointID:
                type: string
              phase:
                type: string
              zonesAddresses:
                additionalProperties:
                  type: string
                description: ZonesAddresses represents endpoint addresses in every
                  availability zones
                type: object
            required:
            - cloudAccountID
            - endpointAddress
            - endpointID
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
