apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  name: policy-create-issuer-[TIME]
  namespace: default
  annotations:
    policy.open-cluster-management.io/categories: PR.PT Protective Technology
    policy.open-cluster-management.io/controls: PR.PT-3 Least Functionality
    policy.open-cluster-management.io/standards: NIST-CSF
spec:
  remediationAction: enforce
  disabled: false
  policy-templates:
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-create-issuer-[TIME]
        spec:
          remediationAction: enforce
          severity: low
          namespaceSelector:
            exclude: ["kube-*"]
            include: ["default"]
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: cert-manager.io/v1alpha3
                kind: Issuer
                metadata:
                  name: ss-sample-issuer-[TIME]
                  namespace: default
                  labels:
                    e2e: "true"
                spec:
                  selfSigned: {}
---
apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
  name: binding-policy-create-issuer-[TIME]
  namespace: default
placementRef:
  name: placement-policy-create-issuer-[TIME]
  kind: PlacementRule
  apiGroup: apps.open-cluster-management.io
subjects:
- name: policy-create-issuer-[TIME]
  kind: Policy
  apiGroup: policy.open-cluster-management.io
---
apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
  name: placement-policy-create-issuer-[TIME]
  namespace: default
spec:
  clusterConditions:
  - status: "True"
    type: ManagedClusterConditionAvailable
  clusterSelector:
    matchExpressions:
      []
