<p>i have a helm chart having multiple StatefulSet templates.<br />
i want one of the template to be deployed only during <code>helm install</code><br />
and it should not teminate when doing <code>helm upgrade</code>.</p>
<pre><code>{{- if .Release.IsInstall -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
.....
.....
{{- end -}}  
</code></pre>
<p>as you can see i want this <code>sts</code> to be deployed only during installation and also<br />
i want it to be unaffected(not terminated) when during <code>helm upgrade</code></p>

Abhishek D K
<p>after doing through helm documentation, it provides solution using helm hooks</p>
<pre><code>&quot;helm.sh/hook&quot;: pre-install
&quot;helm.sh/hook-weight&quot;: &quot;-10&quot;  
</code></pre>
<p><a href="https://helm.sh/docs/topics/charts_hooks/#:%7E:text=Description-,pre%2Dinstall,-Executes%20after%20templates" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts_hooks/#:~:text=Description-,pre%2Dinstall,-Executes%20after%20templates</a></p>
