mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 22:23:15 +00:00
Add backwards-compatibility for flags passed to plugins (#2479)
* update plugin server to ignore unknown flags during parse Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
@@ -103,6 +103,7 @@ func (s *server) BindFlags(flags *pflag.FlagSet) Server {
|
||||
flags.Var(s.logLevelFlag, "log-level", fmt.Sprintf("the level at which to log. Valid values are %s.", strings.Join(s.logLevelFlag.AllowedValues(), ", ")))
|
||||
flags.Var(s.featureSet, "features", "list of feature flags for this plugin")
|
||||
s.flagSet = flags
|
||||
s.flagSet.ParseErrorsWhitelist.UnknownFlags = true
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user