apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  annotations:
    argocd.argoproj.io/compare-options: IgnoreExtraneous
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"CM Configuration Management","policy.open-cluster-management.io/controls":"CM-2 Baseline Configuration","policy.open-cluster-management.io/standards":"NIST SP 800-53"},"labels":{"hive.openshift.io/managed":"true"},"name":"osd-cluster-admin","namespace":"openshift-acm-policies"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"osd-cluster-admin"},"spec":{"evaluationInterval":{"compliant":"2h","noncompliant":"45s"},"object-templates":[{"complianceType":"mustonlyhave","metadataComplianceType":"musthave","objectDefinition":{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRoleBinding","metadata":{"name":"osd-cluster-admin"},"roleRef":{"apiGroup":"rbac.authorization.k8s.io","kind":"ClusterRole","name":"cluster-admin"},"subjects":[{"apiGroup":"rbac.authorization.k8s.io","kind":"Group","name":"cluster-admins"}]}}],"pruneObjectBehavior":"DeleteIfCreated","remediationAction":"enforce","severity":"low"}}}]}}
    policy.open-cluster-management.io/categories: CM Configuration Management
    policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
    policy.open-cluster-management.io/standards: NIST SP 800-53
  creationTimestamp: "2023-06-26T07:02:59Z"
  generation: 1
  labels:
    hive.openshift.io/managed: "true"
    policy.open-cluster-management.io/cluster-name: 24jeihcada202bsfvsfp0ent94l6ng3r
    policy.open-cluster-management.io/cluster-namespace: 24jeihcada202bsfvsfp0ent94l6ng3r
    policy.open-cluster-management.io/root-policy: openshift-acm-policies.osd-cluster-admin
  name: openshift-acm-policies.osd-cluster-admin
  namespace: 24jeihcada202bsfvsfp0ent94l6ng3r
  resourceVersion: "193443961"
  uid: 209bf0d5-c99c-40db-bcb8-b5599acc57ec
spec:
  disabled: false
  policy-templates:
  - objectDefinition:
      apiVersion: policy.open-cluster-management.io/v1
      kind: ConfigurationPolicy
      metadata:
        name: osd-cluster-admin
      spec:
        evaluationInterval:
          compliant: 2h
          noncompliant: 45s
        object-templates:
        - complianceType: mustonlyhave
          metadataComplianceType: musthave
          objectDefinition:
            apiVersion: rbac.authorization.k8s.io/v1
            kind: ClusterRoleBinding
            metadata:
              name: osd-cluster-admin
            roleRef:
              apiGroup: rbac.authorization.k8s.io
              kind: ClusterRole
              name: cluster-admin
            subjects:
            - apiGroup: rbac.authorization.k8s.io
              kind: Group
              name: cluster-admins
        pruneObjectBehavior: DeleteIfCreated
        remediationAction: enforce
        severity: low
status:
  compliant: Compliant
  details:
  - compliant: Compliant
    history:
    - eventName: openshift-acm-policies.osd-cluster-admin.176c243ca3df1b2d
      lastTimestamp: "2023-06-26T07:16:43Z"
      message: Compliant; notification - clusterrolebindings [osd-cluster-admin] found
        as specified, therefore this Object template is compliant
    - eventName: openshift-acm-policies.osd-cluster-admin.176c241f709db286
      lastTimestamp: "2023-06-26T07:14:37Z"
      message: Compliant; notification - clusterrolebindings [osd-cluster-admin] was
        missing, and was created successfully
    - eventName: openshift-acm-policies.osd-cluster-admin.176c241f6fadd472
      lastTimestamp: "2023-06-26T07:14:37Z"
      message: NonCompliant; violation - No instances of `clusterrolebindings` found
        as specified
    - eventName: openshift-acm-policies.osd-cluster-admin.176c23c4401d211f
      lastTimestamp: "2023-06-26T07:08:06Z"
      message: 'NonCompliant; template-error; Failed to get the object in the policy
        template: context canceled'
    templateMeta:
      creationTimestamp: null
      name: osd-cluster-admin
