---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.2
  name: networkpeers.cloud.pingcap.com
spec:
  group: cloud.pingcap.com
  names:
    categories:
    - infra-api
    kind: NetworkPeer
    listKind: NetworkPeerList
    plural: networkpeers
    singular: networkpeer
  preserveUnknownFields: false
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: NetworkPeer is the Schema for the networkpeers 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: NetworkPeerSpec defines the desired state of NetworkPeer
            properties:
              source:
                type: string
              target:
                properties:
                  aws:
                    properties:
                      accountId:
                        type: string
                      peerCIDR:
                        type: string
                      peerRegion:
                        type: string
                      vpcId:
                        type: string
                    required:
                    - accountId
                    - peerCIDR
                    - peerRegion
                    - vpcId
                    type: object
                  gcp:
                    properties:
                      peerNetwork:
                        type: string
                      projectId:
                        type: string
                    required:
                    - peerNetwork
                    - projectId
                    type: object
                  network:
                    properties:
                      networkName:
                        type: string
                    required:
                    - networkName
                    type: object
                type: object
            required:
            - source
            - target
            type: object
          status:
            description: NetworkPeerStatus defines the observed state of NetworkPeer
            properties:
              hostedZoneId:
                type: string
              peeringId:
                type: string
              phase:
                type: string
              vpcCidr:
                type: string
            required:
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
