Enable `TakeOwnership` at install/upgrade

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2024-09-12 14:39:38 +03:00
parent bbd364f7a0
commit 3c0ef0e030
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
2 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ func newInstall(config *helmaction.Configuration, obj *v2.HelmRelease, opts []In
install.Replace = obj.GetInstall().Replace
install.Devel = true
install.SkipCRDs = true
install.TakeOwnership = true
if obj.Spec.TargetNamespace != "" {
install.CreateNamespace = obj.GetInstall().CreateNamespace

View File

@ -76,6 +76,7 @@ func newUpgrade(config *helmaction.Configuration, obj *v2.HelmRelease, opts []Up
upgrade.Force = obj.GetUpgrade().Force
upgrade.CleanupOnFail = obj.GetUpgrade().CleanupOnFail
upgrade.Devel = true
upgrade.TakeOwnership = true
// If the user opted-in to allow DNS lookups, enable it.
if allowDNS, _ := features.Enabled(features.AllowDNSLookups); allowDNS {