<p>I have a custom application helm chart with an ingress object which is deployed in production.
Now I need to migrate the ingress source code object from the helm chart to terraform to give control over the object to another team.
Technically no problem with accepting a downtime.
But I want to keep the ingress object from being undeployed by the helm chart during deployment as there is a letsencrypt certificate attached to it.</p>
<p>So is there a possibility to tell helm to keep the ingress object when I remove the ingress in the source of the helm chart during helm upgrade?</p>

Uwe Bartels
<p>found the answer myself in the helm anntotations. <a href="https://helm.sh/docs/howto/charts_tips_and_tricks/#tell-helm-not-to-uninstall-a-resource" rel="nofollow noreferrer">https://helm.sh/docs/howto/charts_tips_and_tricks/#tell-helm-not-to-uninstall-a-resource</a></p>
<p>That mean's you deploy the ingress again via helm chart with the annotation &quot;helm.sh/resource-policy&quot;: keep.
Then you remove the ingress from the helm chart and redeploy it.
Now the ingress is still deployed in kubernetes but not anymore under control of the helm release.
Next step is to model/code the ingress in terraform and import the resource via terraform import.
Last step is to test with <code>terraform plan</code> if the imported resource corresponds completely with the coded ingress in terraform</p>
<p>That's it.</p>
