<p>I'm creating a Helm chart that can be installed in multiple namespaces. Among other resources it includes a ClusterRole.</p>

<p>Once the chart is installed correctly in one namespace I try to install it in another one but fails complaining about the already existing ClusterRole:</p>

<pre><code>Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: kind: ClusterRole, namespace: , name: config-reader
helm.go:76: [debug] existing resource conflict: kind: ClusterRole, namespace: , name: config-reader
</code></pre>

<p>What's the workaround here? Is there a way to force Helm to ignore this existing resources? </p>

codependent
<p>According to the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole" rel="nofollow noreferrer">documentation</a></p>
<blockquote>
<p>ClusterRole, by contrast, is a non-namespaced resource.</p>
<p>If you want to define a role within a namespace, use a Role; if you want to define a role cluster-wide, use a ClusterRole.</p>
</blockquote>
<p>So, Either you can use the variable name for ClusterRole or use <a href="https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-lookup-function" rel="nofollow noreferrer">lookup</a> to check if the resource already exists.</p>
