mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 12:45:39 +02:00
Add --skip-diff-on-install to helmfile diff (#1841)
* Add --skip-diff-on-install to helmfile diff
This commit is contained in:
+5
-4
@@ -1436,10 +1436,11 @@ func (a *App) diff(r *Run, c DiffConfigProvider) (*string, bool, bool, []error)
|
||||
r.helm.SetExtraArgs(argparser.GetArgs(c.Args(), r.state)...)
|
||||
|
||||
opts := &state.DiffOpts{
|
||||
Context: c.Context(),
|
||||
Output: c.DiffOutput(),
|
||||
NoColor: c.NoColor(),
|
||||
Set: c.Set(),
|
||||
Context: c.Context(),
|
||||
Output: c.DiffOutput(),
|
||||
NoColor: c.NoColor(),
|
||||
Set: c.Set(),
|
||||
SkipDiffOnInstall: c.SkipDiffOnInstall(),
|
||||
}
|
||||
|
||||
st.Releases = selectedAndNeededReleases
|
||||
|
||||
@@ -98,6 +98,7 @@ type DiffConfigProvider interface {
|
||||
SuppressSecrets() bool
|
||||
ShowSecrets() bool
|
||||
SuppressDiff() bool
|
||||
SkipDiffOnInstall() bool
|
||||
|
||||
SkipNeeds() bool
|
||||
IncludeNeeds() bool
|
||||
|
||||
+20
-14
@@ -36,6 +36,7 @@ type diffConfig struct {
|
||||
concurrency int
|
||||
detailedExitcode bool
|
||||
interactive bool
|
||||
skipDiffOnInstall bool
|
||||
logger *zap.SugaredLogger
|
||||
}
|
||||
|
||||
@@ -111,6 +112,10 @@ func (a diffConfig) Interactive() bool {
|
||||
return a.interactive
|
||||
}
|
||||
|
||||
func (a diffConfig) SkipDiffOnInstall() bool {
|
||||
return a.skipDiffOnInstall
|
||||
}
|
||||
|
||||
func (a diffConfig) Logger() *zap.SugaredLogger {
|
||||
return a.logger
|
||||
}
|
||||
@@ -125,20 +130,21 @@ func TestDiff(t *testing.T) {
|
||||
}
|
||||
|
||||
testcases := []struct {
|
||||
name string
|
||||
loc string
|
||||
ns string
|
||||
concurrency int
|
||||
detailedExitcode bool
|
||||
error string
|
||||
flags flags
|
||||
files map[string]string
|
||||
selectors []string
|
||||
lists map[exectest.ListKey]string
|
||||
diffs map[exectest.DiffKey]error
|
||||
upgraded []exectest.Release
|
||||
deleted []exectest.Release
|
||||
log string
|
||||
name string
|
||||
loc string
|
||||
ns string
|
||||
concurrency int
|
||||
skipDiffOnInstall bool
|
||||
detailedExitcode bool
|
||||
error string
|
||||
flags flags
|
||||
files map[string]string
|
||||
selectors []string
|
||||
lists map[exectest.ListKey]string
|
||||
diffs map[exectest.DiffKey]error
|
||||
upgraded []exectest.Release
|
||||
deleted []exectest.Release
|
||||
log string
|
||||
}{
|
||||
//
|
||||
// complex test cases for smoke testing
|
||||
|
||||
Reference in New Issue
Block a user