---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: networks.networking.containeros.dev
spec:
  group: networking.containeros.dev
  names:
    kind: Network
    listKind: NetworkList
    plural: networks
    shortNames:
      - net
    singular: network
  scope: Cluster
  versions:
    - additionalPrinterColumns:
        - description: The cni type
          jsonPath: .spec.type
          name: Type
          type: string
        - description: Whether support fixed ip
          jsonPath: .spec.isFixedIP
          name: FixedIP
          type: boolean
        - description: Show the subnet cidr
          jsonPath: .spec.subnets[*].cidr
          name: Subnets
          type: string
        - description: Timeout to recycle IP of dead Pod
          jsonPath: .spec.ipRecycleTimeout
          name: Timeout
          type: integer
      name: v1beta1
      schema:
        openAPIV3Schema:
          description: Network are non-namespaced; the id of the network
          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: NetworkSpec describes network info.
              properties:
                cni:
                  description: CNI describes the cni info.
                  properties:
                    bridge-vlan:
                      description: BridgeVlan describes bridge vlan info.
                      properties:
                        phyDev:
                          type: string
                        vlan:
                          maximum: 4094
                          minimum: 2
                          type: integer
                      required:
                        - phyDev
                        - vlan
                      type: object
                    calico:
                      description: Calico describes the calico info.
                      properties:
                        asNumber:
                          description: ASNumber represent the autonomous system of bgp
                          maximum: 65534
                          minimum: 64512
                          type: integer
                        networkBackend:
                          enum:
                            - bird
                            - vxlan
                            - none
                          type: string
                        rrPeerType:
                          description: RRPeerType represent where the bgp router reflector locates
                          enum:
                            - inCluster
                            - router
                          type: string
                        rrPeers:
                          items:
                            type: string
                          type: array
                      required:
                        - networkBackend
                      type: object
                    canal:
                      description: Canal describes canal info. Deprecated
                      type: object
                    other:
                      description: OtherCNI describes cni we do not support yet.
                      properties:
                        Paremeters:
                          additionalProperties:
                            type: string
                          type: object
                        type:
                          type: string
                      required:
                        - type
                      type: object
                  type: object
                ipRecycleTimeout:
                  format: int32
                  type: integer
                isDefaultNetwork:
                  type: boolean
                isFixedIP:
                  type: boolean
                subnets:
                  items:
                    description: Subnet describe subnet info.
                    properties:
                      cidr:
                        description: CIDR represent the cidr of this subnet
                        type: string
                      gateway:
                        anyOf:
                          - format: byte
                          - format: ipv4
                          - format: ipv6
                        description: Gateway represent the gateway of subnet
                        type: string
                      id:
                        type: string
                      nodeCidrMaskSize:
                        description: NodeCidrMaskSize represent network mask size of a node NodeCidrMaskSize define canal network node cidr mask size
                        type: integer
                      rangeEnd:
                        anyOf:
                          - format: byte
                          - format: ipv4
                          - format: ipv6
                        description: RangeEnd represent the end ip of range
                        type: string
                      rangeStart:
                        anyOf:
                          - format: byte
                          - format: ipv4
                          - format: ipv6
                        description: RangeStart represent the start ip of range
                        type: string
                    required:
                      - cidr
                      - id
                    type: object
                  type: array
                type:
                  type: string
              required:
                - cni
                - type
              type: object
            status:
              description: NetworkStatus represent the status of network
              properties:
                subnetStatuses:
                  description: SubnetStatuses contains a list of SubnetStatus
                  items:
                    description: SubnetStatus define the status of subnet
                    properties:
                      available:
                        description: Available number of ips in the range
                        type: integer
                      bitset:
                        description: Bitset represent all ips in the range
                        type: string
                      id:
                        description: ID of the subnet
                        type: string
                      rangeEnd:
                        anyOf:
                          - format: byte
                          - format: ipv4
                          - format: ipv6
                        description: RangeEnd represent the end ip of range
                        type: string
                      rangeStart:
                        anyOf:
                          - format: byte
                          - format: ipv4
                          - format: ipv6
                        description: RangeStart represent the start ip of range
                        type: string
                    type: object
                  type: array
              type: object
          required:
            - spec
          type: object
      served: true
      storage: true
      subresources:
        status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
