Advanced Cluster Management (ACM) Governance Policy: failed to parse the template JSON string

Solution Verified - Updated -

Issue

  • When deploying a configmap containing OutCold configuration data, the following error message is noted in the Advanced Cluster Management (ACM) console; under policies -> outcold-logging-resources

    violation - failed to parse the template JSON string {"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"outcold-logging-resources"},"spec":{"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"v1","data":{"001-general.conf":"# The general configuration is used for all deployments\n#\n# Run collector with the flag `-conf` and specify location of the configuration files.\n#\n# You can override all the values using environment variables with the format like\n#
    <snip>
    ,"kind":"ConfigMap","metadata":{"labels":{"app":"collectorforopenshift"},"name":"collectorforopenshift","namespace":"clo-outcold-infra"}}}],"remediationAction":"enforce","severity":"high"}}: template: tmpl:11: unexpected "\\" in operand
    

Environment

  • Red Hat Advanced Cluster Management for Kubernetes 2.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content