---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: vpcpeerings.dedicated.regionalserver.tidbcloud.com
spec:
  group: dedicated.regionalserver.tidbcloud.com
  names:
    categories:
    - regionserver
    kind: VPCPeering
    listKind: VPCPeeringList
    plural: vpcpeerings
    singular: vpcpeering
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.externalName
      name: EXTERNAL-NAME
      type: string
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    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:
            properties:
              dataPlane:
                properties:
                  name:
                    type: string
                  namespace:
                    type: string
                required:
                - name
                - namespace
                type: object
              provider:
                type: string
              region:
                type: string
              tags:
                additionalProperties:
                  type: string
                type: object
              target:
                properties:
                  alicloud:
                    properties:
                      peerCIDR:
                        type: string
                      peerRegion:
                        type: string
                      uid:
                        type: string
                      vpcId:
                        type: string
                    required:
                    - peerCIDR
                    - peerRegion
                    - uid
                    - vpcId
                    type: object
                  aws:
                    properties:
                      accountId:
                        type: string
                      peerCIDR:
                        type: string
                      peerRegion:
                        type: string
                      vpcId:
                        type: string
                    required:
                    - accountId
                    - peerCIDR
                    - peerRegion
                    - vpcId
                    type: object
                type: object
            required:
            - dataPlane
            - provider
            - region
            - target
            type: object
          status:
            properties:
              alicloud:
                properties:
                  routes:
                    items:
                      description: VPCPeeringRoute represents a route entry for VPC
                        Peering.
                      properties:
                        name:
                          description: Name is the Route CR name
                          type: string
                        routeTableName:
                          description: RouteTableName is the RouteTable CR name this
                            route belongs to
                          type: string
                        state:
                          description: State is the route state (active, blackhole,
                            etc.)
                          type: string
                      type: object
                    type: array
                type: object
              aws:
                description: Cloud-specific status fields
                properties:
                  routes:
                    description: |-
                      Routes tracks the Route CRs created for this VPC Peering connection.
                      Each route represents an entry in a node route table pointing to the peering connection.
                    items:
                      description: VPCPeeringRoute represents a route entry for VPC
                        Peering.
                      properties:
                        name:
                          description: Name is the Route CR name
                          type: string
                        routeTableName:
                          description: RouteTableName is the RouteTable CR name this
                            route belongs to
                          type: string
                        state:
                          description: State is the route state (active, blackhole,
                            etc.)
                          type: string
                      type: object
                    type: array
                type: object
              crossplaneResourceName:
                type: string
              externalName:
                description: the resource name in provider, same as crossplane external
                  name
                type: string
              phase:
                description: Common fields (all clouds)
                type: string
              reason:
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
