apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata :
  name : customresponses.openappsec.io

spec:
  group: openappsec.io
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - block-page
                    #- redirect
                    - response-code-only
                message-title:
                  type: string
                message-body:
                  type: string
                http-response-code:
                  type: integer
                  minimum: 100
                  maximum: 599

  scope: Cluster
  names:
    plural: customresponses
    singular: customresponse
    kind: CustomResponse
    shortNames:
    - customresponse
