mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-19 13:46:08 +00:00
Pass Velero server command args to the plugins
Pass Velero server command args to the plugins Fixes #7806 Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
@@ -45,6 +45,9 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
Hidden: true,
|
||||
Short: "INTERNAL COMMAND ONLY - not intended to be run directly by users",
|
||||
Run: func(c *cobra.Command, args []string) {
|
||||
config := pluginServer.GetConfig()
|
||||
f.SetClientQPS(config.ClientQPS)
|
||||
f.SetClientBurst(config.ClientBurst)
|
||||
pluginServer = pluginServer.
|
||||
RegisterBackupItemAction(
|
||||
"velero.io/pv",
|
||||
@@ -197,6 +200,9 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
}
|
||||
pluginServer.Serve()
|
||||
},
|
||||
FParseErrWhitelist: cobra.FParseErrWhitelist{ // Velero.io word list : ignore
|
||||
UnknownFlags: true,
|
||||
},
|
||||
}
|
||||
pluginServer.BindFlags(c.Flags())
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user