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 {
86
86
}
87
87
88
88
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 " ),
93
99
Args : func (cmd * cobra.Command , args []string ) error {
94
100
return checkArgsLength (len (args ), "release name" , "chart path" )
95
101
},
@@ -114,6 +120,9 @@ func newChartCommand() *cobra.Command {
114
120
}
115
121
return diff .run ()
116
122
},
123
+ FParseErrWhitelist : cobra.FParseErrWhitelist {
124
+ UnknownFlags : os .Getenv ("HELM_DIFF_IGNORE_UNKNOWN_FLAGS" ) == "true" ,
125
+ },
117
126
}
118
127
119
128
f := cmd .Flags ()
You can’t perform that action at this time.
0 commit comments