Implement --diff-args (#959)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2023-08-09 19:47:15 +08:00
committed by GitHub
parent ab50997798
commit 9bc7bfc500
9 changed files with 39 additions and 1 deletions
+7
View File
@@ -34,6 +34,8 @@ type ApplyOptions struct {
IncludeTransitiveNeeds bool
// SkipDiffOnInstall is true if the diff should be skipped on install
SkipDiffOnInstall bool
// DiffArgs is the list of arguments to pass to the helm-diff.
DiffArgs string
// IncludeTests is true if the tests should be included
IncludeTests bool
// Suppress is true if the output should be suppressed
@@ -155,6 +157,11 @@ func (a *ApplyImpl) SkipDiffOnInstall() bool {
return a.ApplyOptions.SkipDiffOnInstall
}
// DiffArgs is the list of arguments to pass to helm-diff.
func (a *ApplyImpl) DiffArgs() string {
return a.ApplyOptions.DiffArgs
}
// SkipNeeds returns the skip needs.
func (a *ApplyImpl) SkipNeeds() bool {
if !a.IncludeNeeds() {
+7
View File
@@ -42,6 +42,8 @@ type DiffOptions struct {
ResetValues bool
// Propagate '--post-renderer' to helmv3 template and helm install
PostRenderer string
// DiffArgs is the list of arguments to pass to helm-diff.
DiffArgs string
}
// NewDiffOptions creates a new Apply
@@ -147,6 +149,11 @@ func (t *DiffImpl) SkipDiffOnInstall() bool {
return t.DiffOptions.SkipDiffOnInstall
}
// DiffArgs returns the list of arguments to pass to helm-diff.
func (t *DiffImpl) DiffArgs() string {
return t.DiffOptions.DiffArgs
}
// Suppress returns the suppress
func (t *DiffImpl) Suppress() []string {
return t.DiffOptions.Suppress