---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.3
  name: nodenetworkconfigs.acn.azure.com
spec:
  group: acn.azure.com
  names:
    kind: NodeNetworkConfig
    listKind: NodeNetworkConfigList
    plural: nodenetworkconfigs
    shortNames:
    - nnc
    singular: nodenetworkconfig
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.requestedIPCount
      name: Requested IPs
      priority: 1
      type: integer
    - jsonPath: .spec.availabilityZone
      name: Availability Zone
      priority: 1
      type: string
    - jsonPath: .status.assignedIPCount
      name: Allocated IPs
      type: integer
    - jsonPath: .status.networkContainers[*].subnetName
      name: Subnet
      priority: 1
      type: string
    - jsonPath: .status.networkContainers[*].subnetAddressSpace
      name: Subnet CIDR
      priority: 1
      type: string
    - jsonPath: .status.networkContainers[*].id
      name: NC ID
      priority: 1
      type: string
    - jsonPath: .status.networkContainers[*].assignmentMode
      name: NC Mode
      type: string
    - jsonPath: .status.networkContainers[*].type
      name: NC Type
      priority: 1
      type: string
    - jsonPath: .status.networkContainers[*].version
      name: NC Version
      type: integer
    name: v1alpha
    schema:
      openAPIV3Schema:
        description: NodeNetworkConfig is the Schema for the nodenetworkconfigs 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: NodeNetworkConfigSpec defines the desired state of NetworkConfig
            properties:
              availabilityZone:
                description: AvailabilityZone contains the Azure availability zone
                  for the virtual machine where network containers are placed.
                type: integer
              ipsNotInUse:
                items:
                  type: string
                type: array
              requestedIPCount:
                default: 0
                format: int64
                type: integer
            type: object
          status:
            description: NodeNetworkConfigStatus defines the observed state of NetworkConfig
            properties:
              assignedIPCount:
                default: 0
                type: integer
              networkContainers:
                items:
                  description: NetworkContainer defines the structure of a Network
                    Container as found in NetworkConfigStatus
                  properties:
                    assignmentMode:
                      default: dynamic
                      description: AssignmentMode is whether we are allocated an entire
                        block or IP by IP.
                      enum:
                      - dynamic
                      - static
                      type: string
                    defaultGateway:
                      type: string
                    defaultGatewayV6:
                      type: string
                    id:
                      type: string
                    ipAssignments:
                      items:
                        description: IPAssignment groups an IP address and Name. Name
                          is a UUID set by the the IP address assigner.
                        properties:
                          ip:
                            type: string
                          name:
                            type: string
                        type: object
                      type: array
                    macAddress:
                      type: string
                    nodeIP:
                      type: string
                    primaryIP:
                      type: string
                    primaryIPV6:
                      type: string
                    resourceGroupID:
                      type: string
                    status:
                      description: NCStatus indicates the latest NC request status
                      enum:
                      - NCUpdateSubnetFullError
                      - NCUpdateInternalServerError
                      - NCUpdateUnauthorizedError
                      - NCUpdateSuccess
                      - NCUpdateFailed
                      type: string
                    subcriptionID:
                      type: string
                    subnetAddressSpace:
                      type: string
                    subnetID:
                      type: string
                    subnetName:
                      type: string
                    type:
                      default: vnet
                      description: NCType is the specific type of network this NC
                        represents.
                      type: string
                    version:
                      default: 0
                      format: int64
                      type: integer
                    vnetID:
                      type: string
                  type: object
                type: array
              scaler:
                description: Scaler groups IP request params together
                properties:
                  batchSize:
                    format: int64
                    type: integer
                  maxIPCount:
                    format: int64
                    type: integer
                  releaseThresholdPercent:
                    format: int64
                    type: integer
                  requestThresholdPercent:
                    format: int64
                    type: integer
                type: object
              status:
                description: Status indicates the NNC reconcile status
                enum:
                - Updating
                - Updated
                - Error
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
