apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: pulsartriggers.kubeless.io
spec:
  group: kubeless.io
  names:
    kind: PulsarTrigger
    plural: pulsartriggers
    singular: pulsartrigger
  scope: Namespaced
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                pulsar:
                  type: object
                  properties:
                    topic:
                      type: string
                    broker:
                      type: string
                    auth-token:
                      type: string
                  required:
                    - topic
                    - broker
                kubeless:
                  type: object
                  properties:
                    function:
                      type: string
                  required:
                    - function
                deployment:
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
              required:
                - pulsar
                - kubeless
      additionalPrinterColumns:
        - name: Broker
          type: string
          description: Pulsar broker address
          jsonPath: .spec.pulsar.broker
        - name: Topic
          type: string
          description: Pulsar topic name
          jsonPath: .spec.pulsar.topic
        - name: Fn NS
          type: string
          description: Function namespace
          jsonPath: .spec.kubeless.namespace
        - name: Fn
          type: string
          description: Function name
          jsonPath: .spec.kubeless.function
