pkg/install: add RecreateResources flag
Enable RecreateResources (a.k.a. `--recreate`) when installing Helm
releases.
This allows objects that changed in a new release and have immutable
fields to be upgraded without user intervention. Helm will delete and
recreate those resources.
@@ -105,6 +105,7 @@ func InstallAsRelease(name string, c components.Component, kubeconfig string) er
upgrade := action.NewUpgrade(actionConfig)
upgrade.Wait = wait
+ upgrade.RecreateResources = true
if _, err := upgrade.Run(name, chart, map[string]interface{}{}); err != nil {
return fmt.Errorf("updating chart failed: %w", err)
