feat: add --take-ownership flag to helm diff and related config (#1992)

* feat: add --take-ownership flag to helm diff and related config

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix: nil issue

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix more issue

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix more issues

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>

* add more tests

Signed-off-by: yxxhero <aiopsclub@163.com>

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2025-04-27 12:57:41 -04:00
committed by GitHub
parent 6b5f1496a8
commit c3864a45d3
11 changed files with 117 additions and 24 deletions
+8
View File
@@ -49,6 +49,8 @@ type DiffOptions struct {
// SuppressOutputLineRegex is a list of regexes to suppress output lines
SuppressOutputLineRegex []string
SkipSchemaValidation bool
// TakeOwnership is true if the ownership should be taken
TakeOwnership bool
}
// NewDiffOptions creates a new Apply
@@ -201,6 +203,12 @@ func (t *DiffImpl) SuppressOutputLineRegex() []string {
return t.DiffOptions.SuppressOutputLineRegex
}
// SkipSchemaValidation returns the SkipSchemaValidation.
func (t *DiffImpl) SkipSchemaValidation() bool {
return t.DiffOptions.SkipSchemaValidation
}
// TakeOwnership returns the TakeOwnership.
func (t *DiffImpl) TakeOwnership() bool {
return t.DiffOptions.TakeOwnership
}