apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: nvwafsecurityrules.neuvector.com
spec:
  group: neuvector.com
  names:
    kind: NvWafSecurityRule
    listKind: NvWafSecurityRuleList
    plural: nvwafsecurityrules
    singular: nvwafsecurityrule
  scope: Cluster
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              sensor:
                properties:
                  comment:
                    type: string
                  name:
                    type: string
                  rules:
                    items:
                      properties:
                        name:
                          type: string
                        patterns:
                          items:
                            properties:
                              context:
                                enum:
                                - url
                                - header
                                - body
                                - packet
                                type: string
                              key:
                                enum:
                                - pattern
                                type: string
                              op:
                                enum:
                                - regex
                                - '!regex'
                                type: string
                              value:
                                type: string
                            required:
                            - key
                            - op
                            - value
                            - context
                            type: object
                          type: array
                      required:
                      - name
                      - patterns
                      type: object
                    type: array
                required:
                - name
                type: object
            required:
            - sensor
            type: object
        type: object
    served: true
    storage: true
