-
Bug
-
Resolution: Unresolved
-
Major
-
ACM 2.14.0
-
None
-
Quality / Stability / Reliability
-
2
-
False
-
-
False
-
-
-
GRC Sprint 2025-21, GRC Sprint 2025-22
-
Important
-
Customer Facing
-
Proposed
-
None
Using skipObject to prevent an object from being created where the CRD does not exist in the cluster results in an error.
Give a ConfigurationPolicy like:
apiVersion: policy.open-cluster-management.io/v1 kind: ConfigurationPolicy metadata: name: test-skip spec: object-templates: - complianceType: musthave objectDefinition: apiVersion: v1 kind: FakeKind metadata: labels: removed-in-ocp419: '{{ skipObject }}' name: testskip namespace: default spec: data: fake: test remediationAction: inform severity: medium
ACM returns this error:
violation - couldn't find mapping resource with kind FakeKind in API version v1, please check if you have CRD deployed
The policytools correctly returns no object-templates
$ policytools template-resolver test-skip.yml apiVersion: policy.open-cluster-management.io/v1 kind: ConfigurationPolicy metadata: name: test-skip spec: object-templates: [] remediationAction: inform severity: medium