---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    haproxy.org/custom-annotations: v1.0.0
  name: validationrules.ingress.v3.haproxy.org
spec:
  group: ingress.v3.haproxy.org
  names:
    kind: ValidationRules
    listKind: ValidationRulesList
    plural: validationrules
    singular: validationrules
  scope: Namespaced
  versions:
  - name: v3
    schema:
      openAPIV3Schema:
        description: ValidationRules is a specification for a ValidationRules resource
        properties:
          apiVersion:
            description: |-
              APIVersion defines the versioned schema of this representation of an object.
              Servers should convert recognized schemas to the latest internal value, and
              may reject unrecognized values.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
            type: string
          kind:
            description: |-
              Kind is a string value representing the REST resource this object represents.
              Servers may infer this from the endpoint the client submits requests to.
              Cannot be updated.
              In CamelCase.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
            type: string
          metadata:
            type: object
          spec:
            properties:
              prefix:
                type: string
              validation_rules:
                additionalProperties:
                  description: Rule defines the structure for a single validation
                    rule in the YAML.
                  properties:
                    ingresses:
                      description: ingresses where this rule can apply (ingress names)
                      items:
                        type: string
                      type: array
                    namespaces:
                      description: namespaces where this rule can apply (namespace
                        names)
                      items:
                        type: string
                      type: array
                    order_priority:
                      description: Optional priority for sorting rules, bigger value
                        has higher priority
                      type: integer
                    resources:
                      description: resources where this rule can apply (service, frontend)
                      items:
                        type: string
                      maxItems: 42
                      type: array
                    rule:
                      type: string
                    section:
                      default: backend
                      enum:
                      - frontend
                      - backend
                      - all
                      type: string
                    template:
                      type: string
                    type:
                      description: AnnType defines the type of annotation used in
                        the validation rules.
                      enum:
                      - duration
                      - int
                      - uint
                      - bool
                      - string
                      - float
                      - json
                      type: string
                  required:
                  - rule
                  - type
                  type: object
                type: object
            required:
            - validation_rules
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
