mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 19:01:50 +02:00
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:
@@ -1390,6 +1390,7 @@ func (a *App) apply(r *Run, c ApplyConfigProvider) (bool, bool, []error) {
|
||||
PostRendererArgs: c.PostRendererArgs(),
|
||||
SkipSchemaValidation: c.SkipSchemaValidation(),
|
||||
SuppressOutputLineRegex: c.SuppressOutputLineRegex(),
|
||||
TakeOwnership: c.TakeOwnership(),
|
||||
}
|
||||
|
||||
infoMsg, releasesToBeUpdated, releasesToBeDeleted, errs := r.diff(false, detailedExitCode, c, diffOpts)
|
||||
@@ -1634,6 +1635,7 @@ func (a *App) diff(r *Run, c DiffConfigProvider) (*string, bool, bool, []error)
|
||||
PostRendererArgs: c.PostRendererArgs(),
|
||||
SkipSchemaValidation: c.SkipSchemaValidation(),
|
||||
SuppressOutputLineRegex: c.SuppressOutputLineRegex(),
|
||||
TakeOwnership: c.TakeOwnership(),
|
||||
}
|
||||
|
||||
filtered := &Run{
|
||||
|
||||
@@ -157,6 +157,7 @@ type DiffConfigProvider interface {
|
||||
NoColor() bool
|
||||
Context() int
|
||||
DiffOutput() string
|
||||
TakeOwnership() bool
|
||||
|
||||
concurrencyConfig
|
||||
valuesControlMode
|
||||
|
||||
@@ -46,6 +46,7 @@ type diffConfig struct {
|
||||
skipSchemaValidation bool
|
||||
reuseValues bool
|
||||
logger *zap.SugaredLogger
|
||||
takeOwnership bool
|
||||
}
|
||||
|
||||
func (a diffConfig) Args() string {
|
||||
@@ -183,6 +184,9 @@ func (a diffConfig) SkipSchemaValidation() bool {
|
||||
func (a diffConfig) SuppressOutputLineRegex() []string {
|
||||
return a.suppressOutputLineRegex
|
||||
}
|
||||
func (a diffConfig) TakeOwnership() bool {
|
||||
return a.takeOwnership
|
||||
}
|
||||
|
||||
func TestDiff(t *testing.T) {
|
||||
type flags struct {
|
||||
|
||||
Reference in New Issue
Block a user