apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: rules.compliance.openshift.io
spec:
  group: compliance.openshift.io
  names:
    kind: Rule
    listKind: RuleList
    plural: rules
    singular: rule
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Rule is the Schema for the rules API
        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
          availableFixes:
            description: The Available fixes
            items:
              description: FixDefinition Specifies a fix or remediation that applies
                to a rule
              properties:
                disruption:
                  description: An estimate of the potential disruption or operational
                    degradation that this fix will impose in the target system
                  type: string
                fixObject:
                  description: an object that should bring the rule into compliance
                  type: object
                  x-kubernetes-embedded-resource: true
                  x-kubernetes-preserve-unknown-fields: true
                platform:
                  description: The platform that the fix applies to
                  type: string
              type: object
            nullable: true
            type: array
            x-kubernetes-list-type: atomic
          checkType:
            description: 'What type of check will this rule execute: Platform, Node
              or none (represented by an empty string)'
            type: string
          description:
            description: The description of the Rule
            type: string
          id:
            description: The XCCDF ID
            type: string
          instructions:
            description: Instructions for auditing this specific rule
            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
          rationale:
            description: The rationale of the Rule
            type: string
          severity:
            description: The severity level
            type: string
          title:
            description: The title of the Rule
            type: string
          warning:
            description: A discretionary warning about the of the Rule
            type: string
        required:
        - id
        - title
        type: object
    served: true
    storage: true
