apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
    name: whitelistitems.security.banzaicloud.com
spec:
    group: security.banzaicloud.com
    names:
        kind: WhiteListItem
        plural: whitelistitems
        singular: whitelistitem
        shortNames:
          - wl
    scope: Cluster
    versions:
        - name: v1alpha1
          schema:
              openAPIV3Schema:
                  type: object
                  properties:
                      spec:
                          required:
                              - reason
                              - creator
                          properties:
                              reason:
                                  type: string
                              creator:
                                  type: string
                              regexp:
                                  type: string
                          type: object
          served: true
          storage: true
          additionalPrinterColumns:
              - name: Reason
                type: string
                jsonPath: .spec.reason
                priority: 1
              - name: Creator
                type: string
                jsonPath: .spec.creator
                priority: 2
