mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-19 11:05:53 +02:00
feat: Reset values flag (#602)
Ref https://github.com/helmfile/helmfile/discussions/593 * implemented --reset-values flag overriding .helmDefaults.reuseValues=true * tests for --reset-values flag * fixed pkg/app tests * added tests for both reset & reuse flags given * added appendValuesControlMode method for --reuse/reset-values flag processing * updated code comments & docs Signed-off-by: Karol Ossowski <k@koralsky.pl>
This commit is contained in:
+10
-1
@@ -38,6 +38,8 @@ type DiffOptions struct {
|
||||
Output string
|
||||
// ReuseValues is true if the helm command should reuse the values
|
||||
ReuseValues bool
|
||||
// ResetValues is true if helm command should reset values to charts' default
|
||||
ResetValues bool
|
||||
}
|
||||
|
||||
// NewDiffOptions creates a new Apply
|
||||
@@ -160,5 +162,12 @@ func (t *DiffImpl) SuppressSecrets() bool {
|
||||
|
||||
// ReuseValues returns the ReuseValues.
|
||||
func (t *DiffImpl) ReuseValues() bool {
|
||||
return t.DiffOptions.ReuseValues
|
||||
if !t.ResetValues() {
|
||||
return t.DiffOptions.ReuseValues
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (t *DiffImpl) ResetValues() bool {
|
||||
return t.DiffOptions.ResetValues
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user