apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    build.aep.asag.io/source: ipam-api
    build.aep.asag.io/version: 0.1.5
    controller-gen.kubebuilder.io/version: v0.10.0
  creationTimestamp: null
  name: leases.ipam.aep.asag.io
spec:
  group: ipam.aep.asag.io
  names:
    kind: Lease
    listKind: LeaseList
    plural: leases
    shortNames:
      - le
      - lea
      - aepl
      - aeplea
      - aeplease
      - aepleases
    singular: lease
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: .spec.ip
          name: IP
          type: string
        - jsonPath: .spec.for
          name: For
          type: string
        - jsonPath: .spec.agent
          name: Agent
          type: string
        - jsonPath: .spec.lastAssigned
          name: LastAssigned
          type: date
        - 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:
                agent:
                  description: agent who created this lease (informal)
                  type: string
                for:
                  description: unique name of the resource for which this ip is assigned (e.g. containerID, pod namespace+name, etc.). The agent checks against this value to find the assignment.
                  minLength: 1
                  type: string
                ip:
                  description: selected ip
                  minLength: 1
                  type: string
                lastAssigned:
                  description: last (re)assigned
                  format: date-time
                  type: string
              required:
                - for
                - ip
                - lastAssigned
              type: object
          required:
            - metadata
            - spec
          type: object
      served: true
      storage: true
      subresources: {}
