
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: configurationpolicies.policy.open-cluster-management.io
spec:
  group: policy.open-cluster-management.io
  names:
    kind: ConfigurationPolicy
    listKind: ConfigurationPolicyList
    plural: configurationpolicies
    singular: configurationpolicy
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: ConfigurationPolicy is the Schema for the configurationpolicies
          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
          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:
            description: ConfigurationPolicySpec defines the desired state of ConfigurationPolicy
            properties:
              labelSelector:
                additionalProperties:
                  type: string
                type: object
              namespaceSelector:
                description: Target defines the list of namespaces to include/exclude
                properties:
                  exclude:
                    items:
                      type: string
                    type: array
                  include:
                    items:
                      type: string
                    type: array
                type: object
              object-templates:
                items:
                  description: ObjectTemplate describes how an object should look
                  properties:
                    complianceType:
                      description: 'ComplianceType specifies whether it is: musthave,
                        mustnothave, mustonlyhave'
                      type: string
                    objectDefinition:
                      description: ObjectDefinition defines required fields for the
                        object
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                  required:
                  - complianceType
                  type: object
                type: array
              remediationAction:
                description: 'RemediationAction : enforce or inform'
                type: string
              severity:
                description: 'Severity : low, medium or high'
                type: string
            type: object
          status:
            description: ConfigurationPolicyStatus is the status for a Policy resource
            properties:
              compliancyDetails:
                items:
                  description: TemplateStatus hold the status result
                  properties:
                    Compliant:
                      description: ComplianceState shows the state of enforcement
                      type: string
                    Validity:
                      description: Validity describes if it is valid or not
                      properties:
                        reason:
                          type: string
                        valid:
                          type: boolean
                      type: object
                    conditions:
                      items:
                        description: Condition is the base struct for representing
                          resource conditions
                        properties:
                          lastTransitionTime:
                            description: The last time the condition transitioned
                              from one status to another.
                            format: date-time
                            type: string
                          message:
                            description: A human readable message indicating details
                              about the transition.
                            type: string
                          reason:
                            description: The reason for the condition's last transition.
                            type: string
                          status:
                            description: Status of the condition, one of True, False,
                              Unknown.
                            type: string
                          type:
                            description: Type of condition, e.g Complete or Failed.
                            type: string
                        required:
                        - type
                        type: object
                      type: array
                  type: object
                type: array
              compliant:
                description: ComplianceState shows the state of enforcement
                type: string
              relatedObjects:
                items:
                  description: RelatedObject is the list of objects matched by this
                    Policy resource.
                  properties:
                    compliant:
                      type: string
                    object:
                      description: ObjectResource is an object identified by the policy
                        as a resource that needs to be validated.
                      properties:
                        apiVersion:
                          description: API version of the referent.
                          type: string
                        kind:
                          description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
                          type: string
                        metadata:
                          description: Metadata values from the referent.
                          properties:
                            name:
                              description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
                              type: string
                            namespace:
                              description: 'Namespace of the referent. More info:
                                https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
                              type: string
                          type: object
                      type: object
                    reason:
                      type: string
                  type: object
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
