ACM ConfigurationPolicy object-templates-raw fails with "yaml: line X: did not find expected key" when using hub templates with multiline JSON ConfigMap data
Issue
- ConfigurationPolicy with object-templates-raw using hub templates fails with error: "failed to convert the resolved template to JSON: yaml: line X: did not find expected key"
- Policy works correctly when using direct ConfigMap access on single cluster but fails when using hub templates across managed clusters
- Hub template processing corrupts multiline JSON strings from ConfigMap causing template parsing failures
- Error occurs specifically when ConfigMap contains multiline JSON data accessed via fromConfigMap function in hub templates
- PolicyGenerator cannot process object-templates-raw with malformed template syntax
- Commonly occurs when migrating from single-cluster policies to hub-managed policies
Environment
- Red Hat OpenShift Container Platform
- 4
- Red Hat Advanced Cluster Management for Kubernetes
- 2.10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.