<p>Does Helm also remove the created namespace if <code>helm install</code> fails and <code>--atomic</code> option has been used to install the release?</p>
<p>I am unable to find this information on Helm help pages.</p>

Amit
<p>The namespace is not deleted.</p>
<p>In the Helm source, <a href="https://github.com/helm/helm/blob/f31d4fb3aacabf6102b3ec9214b3433a3dbf1812/pkg/action/install.go" rel="nofollow noreferrer"><code>&quot;helm.sh/helm/v3/pkg/action&quot;.Install</code></a> has the main logic that <code>helm install</code> actually runs.  The <code>--atomic</code> handling more specifically is in <a href="https://github.com/helm/helm/blob/f31d4fb3aacabf6102b3ec9214b3433a3dbf1812/pkg/action/install.go#L467-L482" rel="nofollow noreferrer"><code>(*Install).failRelease()</code></a>, which is approximately</p>
<pre class="lang-golang prettyprint-override"><code>rel.SetStatus(release.StatusFailed, fmt.Sprintf(&quot;Release %q failed: %s&quot;, i.ReleaseName, err.Error()))
if i.Atomic {
    uninstall := NewUninstall(i.cfg)
    ... uninstall.Run(i.ReleaseName) ...
}
i.recordRelease(rel)
</code></pre>
<p>The very last line is important here.  This calls through to <a href="https://github.com/helm/helm/blob/f31d4fb3aacabf6102b3ec9214b3433a3dbf1812/pkg/storage/storage.go#L75" rel="nofollow noreferrer"><code>(*&quot;helm.sh/helm/v3/pkg/storage&quot;.Storage).Update()</code></a>, which records the fact of the failed release where <code>helm history</code> can find it.  With the normal Helm configuration, this is in a Secret in the target namespace.  Since the history is recorded in a Secret in the namespace, the namespace can't be deleted.</p>
<p>It's easy to search the source for the <code>Atomic</code> setting, and at least in <code>install.go</code> the only two things it does are to implicitly enable <code>--wait</code> and to run <code>helm uninstall</code> if the install fails.  But neither of those things delete the namespace.</p>
