# A demo CRD for the Kopf example operators.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: kopfexamples.kopf.dev
spec:
  scope: Namespaced
  group: kopf.dev
  names:
    kind: KopfExample
    plural: kopfexamples
    singular: kopfexample
    shortNames:
      - kopfexes
      - kopfex
      - kexes
      - kex
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              x-kubernetes-preserve-unknown-fields: true
            status:
              type: object
              x-kubernetes-preserve-unknown-fields: true
      additionalPrinterColumns:
        - name: Duration
          type: string
          priority: 0
          jsonPath: .spec.duration
          description: For how long the pod should sleep.
        - name: Children
          type: string
          priority: 0
          jsonPath: .status.create_fn.children
          description: The children pods created.
        - name: Message
          type: string
          priority: 0
          jsonPath: .status.create_fn.message
          description: As returned from the handler (sometimes).
