apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    build.aep.asag.io/source: ipam-api
    build.aep.asag.io/version: 0.0.0-e20fc35f
    controller-gen.kubebuilder.io/version: v0.10.0
  creationTimestamp: null
  name: ranges.ipam.aep.asag.io
spec:
  group: ipam.aep.asag.io
  names:
    kind: Range
    listKind: RangeList
    plural: ranges
    shortNames:
      - ra
      - rng
      - aepr
      - aeprng
      - aeprange
      - aepranges
    singular: range
  scope: Cluster
  versions:
    - additionalPrinterColumns:
        - jsonPath: .spec.type
          name: Type
          type: string
        - jsonPath: .spec.network
          name: Network
          type: string
        - jsonPath: .spec.gateway
          name: Gateway
          type: string
        - jsonPath: .metadata.ownerReferences[?(@.controller==true)].kind
          name: OwnerKind
          priority: 2
          type: string
        - jsonPath: .metadata.ownerReferences[?(@.controller==true)].name
          name: OwnerName
          priority: 2
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
      name: v1
      schema:
        openAPIV3Schema:
          description: resource
          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:
                gateway:
                  description: gateway address for this network
                  minLength: 1
                  type: string
                network:
                  description: network range in CIDR notation
                  minLength: 1
                  type: string
                ranges:
                  description: Available ranges. If missing the whole network is available (excluding network, broadcast and gateway address)
                  items:
                    properties:
                      from:
                        minLength: 1
                        type: string
                      to:
                        minLength: 1
                        type: string
                    required:
                      - from
                      - to
                    type: object
                  type: array
                type:
                  description: Type of the range
                  enum:
                    - IPv4
                    - IPv6
                  type: string
              required:
                - gateway
                - network
                - type
              type: object
          required:
            - metadata
            - spec
          type: object
      served: true
      storage: true
      subresources: {}
