File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,16 @@ func newChartCommand() *cobra.Command {
8686 }
8787
8888 cmd := & cobra.Command {
89- Use : "upgrade [flags] [RELEASE] [CHART]" ,
90- Short : "Show a diff explaining what a helm upgrade would change." ,
91- Long : globalUsage ,
92- Example : " helm diff upgrade my-release stable/postgresql --values values.yaml" ,
89+ Use : "upgrade [flags] [RELEASE] [CHART]" ,
90+ Short : "Show a diff explaining what a helm upgrade would change." ,
91+ Long : globalUsage ,
92+ Example : strings .Join ([]string {
93+ " helm diff upgrade my-release stable/postgresql --values values.yaml" ,
94+ "" ,
95+ " # Set HELM_DIFF_IGNORE_UNKNOWN_FLAGS=true to ignore unknown flags" ,
96+ " # It's useful when you're using `helm-diff` in a `helm upgrade` wrapper." ,
97+ " HELM_DIFF_IGNORE_UNKNOWN_FLAGS=true helm diff upgrade my-release stable/postgres --wait" ,
98+ }, "\n " ),
9399 Args : func (cmd * cobra.Command , args []string ) error {
94100 return checkArgsLength (len (args ), "release name" , "chart path" )
95101 },
@@ -114,6 +120,9 @@ func newChartCommand() *cobra.Command {
114120 }
115121 return diff .run ()
116122 },
123+ FParseErrWhitelist : cobra.FParseErrWhitelist {
124+ UnknownFlags : os .Getenv ("HELM_DIFF_IGNORE_UNKNOWN_FLAGS" ) == "true" ,
125+ },
117126 }
118127
119128 f := cmd .Flags ()
You can’t perform that action at this time.
0 commit comments