Is there an existing issue for this?
Current Behavior
I have an application that is being migrated to fleet. The original platform does not use helm. During the first migration, the two resources in the release, one is a native resource and the other is a custom resource. The native resource can be updated normally, but the custom resource cannot be updated. I think this is a problem with helm. I looked up some issues in helm and it seems to be related to this helm/helm#12827.
Then I set helm.force to true in fleet.yaml, hoping to update the resource using the replace method, but I found that fleet does not pass in the force parameter when installing, which makes it ineffective.But when updating, force is allowed.
This is the fleet code I saw
|
u := action.NewInstall(&cfg) |
|
u.ClientOnly = h.template || dryRun |
|
if cfg.Capabilities != nil { |
|
if cfg.Capabilities.KubeVersion.Version != "" { |
|
u.KubeVersion = &cfg.Capabilities.KubeVersion |
|
} |
|
if cfg.Capabilities.APIVersions != nil { |
|
u.APIVersions = cfg.Capabilities.APIVersions |
|
} |
|
} |
|
u.TakeOwnership = options.Helm.TakeOwnership |
|
u.EnableDNS = !options.Helm.DisableDNS |
|
u.Replace = true |
|
u.ReleaseName = releaseName |
|
u.CreateNamespace = true |
|
u.Namespace = defaultNamespace |
|
u.Timeout = timeout |
|
u.DryRun = dryRun |
|
u.PostRenderer = pr |
|
u.WaitForJobs = options.Helm.WaitForJobs |
|
if u.Timeout > 0 { |
|
u.Wait = true |
|
} |
|
if !dryRun { |
|
logger.Info("Installing helm release") |
|
} |
|
return u.Run(chart, values) |
|
u := action.NewUpgrade(&cfg) |
|
u.TakeOwnership = true |
|
u.EnableDNS = !options.Helm.DisableDNS |
|
u.Force = options.Helm.Force |
|
u.Atomic = options.Helm.Atomic |
|
u.MaxHistory = options.Helm.MaxHistory |
|
if u.MaxHistory == 0 { |
|
u.MaxHistory = MaxHelmHistory |
|
} |
|
u.Namespace = defaultNamespace |
|
u.Timeout = timeout |
|
u.DryRun = dryRun |
|
u.DisableOpenAPIValidation = h.template || dryRun |
|
u.PostRenderer = pr |
|
u.WaitForJobs = options.Helm.WaitForJobs |
|
if u.Timeout > 0 { |
|
u.Wait = true |
|
} |
|
if !dryRun { |
|
logger.Info("Upgrading helm release") |
|
} |
|
rel, err := u.Run(releaseName, chart, values) |
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- Architecture: amd64
- Fleet Version: v0.10.1
- Cluster:
- Provider: ACK
- Kubernetes Version: 1.30
Logs
No response
Anything else?
No response
Is there an existing issue for this?
Current Behavior
I have an application that is being migrated to fleet. The original platform does not use helm. During the first migration, the two resources in the release, one is a native resource and the other is a custom resource. The native resource can be updated normally, but the custom resource cannot be updated. I think this is a problem with helm. I looked up some issues in helm and it seems to be related to this helm/helm#12827.
Then I set
helm.forcetotruein fleet.yaml, hoping to update the resource using the replace method, but I found that fleet does not pass in theforceparameter when installing, which makes it ineffective.But when updating,forceis allowed.This is the fleet code I saw
fleet/internal/helmdeployer/install.go
Lines 129 to 155 in 8765f42
fleet/internal/helmdeployer/install.go
Lines 158 to 179 in 8765f42
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Logs
No response
Anything else?
No response