apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  name: jkuli-test
  namespace: nonexist
  annotations:
    policy.open-cluster-management.io/categories: SC System and Communications Protection
    policy.open-cluster-management.io/controls: SC-28 Protection Of Information At Rest
    policy.open-cluster-management.io/standards: NIST SP 800-53
spec:
  disabled: false
  policy-templates:
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: enable-etcd-encryption
        spec:
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: config.openshift.io/v1
                kind: APIServer
                metadata:
                  name: cluster
                spec:
                  encryption:
                    type: aescbc
          remediationAction: inform
          severity: low
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: enable-etcd-encryption-status-kubeapi
        spec:
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: operator.openshift.io/v1
                kind: KubeAPIServer
                metadata:
                  name: cluster
                status:
                  conditions:
                    - message: "All resources encrypted: secrets, configmaps"
                      reason: EncryptionCompleted
          remediationAction: inform
          severity: low
---
apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
  name: clobber-test-placement
  namespace: nonexist
spec:
  clusterSelector:
    matchExpressions: []
  clusterConditions: []
---
apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
  name: clobber-test-placement-binding
  namespace: nonexist
placementRef:
  name: clobber-test-placement
  apiGroup: apps.open-cluster-management.io
  kind: PlacementRule
subjects:
  - name: clobber-test
    apiGroup: policy.open-cluster-management.io
    kind: Policy
