---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: vpcs.dedicated.regionalserver.tidbcloud.com
spec:
  group: dedicated.regionalserver.tidbcloud.com
  names:
    categories:
    - regionserver
    kind: VPC
    listKind: VPCList
    plural: vpcs
    singular: vpc
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: VPC is the Schema for the VPC 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:
              accountRef:
                description: |-
                  AccountReference is a reference to an Account CR.
                  It can be extended to use other types of references, like label selector.
                properties:
                  accountId:
                    description: aws account id, gcp project id or azure subscription
                      id
                    type: string
                  providerConfigName:
                    type: string
                  resourceGroupName:
                    description: ResourceGroupName is used for azure to place all
                      dataplane resources in an existing RG.
                    type: string
                  role:
                    type: string
                required:
                - accountId
                - providerConfigName
                type: object
              cidr:
                type: string
              nodeZones:
                description: If this field is set, workload/node resources should
                  be constrained to these zones.
                items:
                  type: string
                type: array
              privateLinkEndpointZones:
                description: PrivateLinkEndpointZones stores logical AZ names discovered
                  for endpoint-only PrivateLink subnets.
                items:
                  type: string
                type: array
              provider:
                type: string
              region:
                type: string
              zones:
                items:
                  type: string
                type: array
            required:
            - cidr
            - provider
            - region
            type: object
          status:
            properties:
              controlPlaneSubnets:
                description: |-
                  ControlPlaneSubnets stores dedicated control-plane subnets, including EKS control-plane
                  subnets and AKS API server VNet integration subnets.
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              nodeSubnets:
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              phase:
                type: string
              plsNatSubnets:
                description: PLSNatSubnets is used for aks
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              podSubnets:
                description: PodSubnets is used for aks
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              privateLinkEndpointSubnets:
                description: PrivateLinkEndpointSubnets stores endpoint-only subnets
                  for PrivateLink consumer endpoints.
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              privateSubnets:
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              pscFirewall:
                properties:
                  firewallId:
                    format: int64
                    type: integer
                  name:
                    type: string
                  sourceRanges:
                    items:
                      type: string
                    type: array
                type: object
              publicSubnets:
                items:
                  properties:
                    availabilityZone:
                      type: string
                    availabilityZoneId:
                      type: string
                    cidrBlock:
                      type: string
                    name:
                      type: string
                    subnetId:
                      type: string
                  type: object
                type: array
              reason:
                type: string
              resourceGroup:
                description: ResourceGroup is used for azure
                properties:
                  id:
                    type: string
                  name:
                    type: string
                type: object
              securityGroup:
                properties:
                  name:
                    type: string
                  securityGroupId:
                    type: string
                type: object
              vpc:
                properties:
                  name:
                    type: string
                  resourceId:
                    description: for azure
                    type: string
                  vpcId:
                    type: string
                type: object
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
