mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-06 13:35:47 +02:00
feat: add support for helm 4 --server-side upgrade flag (#2641)
* feat: add support for helm 4 --server-side upgrade flag Add support for the helm 4 upgrade flag --server-side which accepts "true", "false", or "auto" (default "auto"). This allows users to explicitly control server-side apply behavior, which is needed for releases originally installed with Helm 3 and being managed with Helm 4. The flag can be configured via: - CLI: --server-side flag on sync, apply, and diff commands - helmDefaults.serverSide in helmfile.yaml - releases[].serverSide per-release override Precedence: release-level > CLI flag > helmDefaults. Errors are returned when serverSide is set but running Helm 3, or when an invalid value is provided. Closes #2640 Signed-off-by: yxxhero <aiopsclub@163.com> * test: update TestGenerateID expected hashes for new ServerSide field Adding ServerSide *string to ReleaseSpec changes spew's %#v output and shifts the FNV hash used by generateValuesID. Update the hard-coded want values to the new deterministic hashes. Signed-off-by: yxxhero <aiopsclub@163.com> --------- Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -47,6 +47,7 @@ type diffConfig struct {
|
||||
reuseValues bool
|
||||
logger *zap.SugaredLogger
|
||||
takeOwnership bool
|
||||
serverSide string
|
||||
enforceNeedsAreInstalled bool
|
||||
}
|
||||
|
||||
@@ -188,6 +189,9 @@ func (a diffConfig) SuppressOutputLineRegex() []string {
|
||||
func (a diffConfig) TakeOwnership() bool {
|
||||
return a.takeOwnership
|
||||
}
|
||||
func (a diffConfig) ServerSide() string {
|
||||
return a.serverSide
|
||||
}
|
||||
|
||||
func (a diffConfig) EnforceNeedsAreInstalled() bool {
|
||||
return a.enforceNeedsAreInstalled
|
||||
|
||||
Reference in New Issue
Block a user