mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-25 09:24:16 +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:
@@ -25,7 +25,6 @@ import (
|
||||
hcplugin "github.com/hashicorp/go-plugin"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/features"
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework"
|
||||
biav2 "github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2"
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
@@ -53,11 +52,8 @@ func newClientBuilder(command string, logger logrus.FieldLogger, logLevel logrus
|
||||
// For plugins compiled into the velero executable, we need to run "velero run-plugins"
|
||||
b.commandArgs = []string{"run-plugins"}
|
||||
}
|
||||
|
||||
b.commandArgs = append(b.commandArgs, "--log-level", logLevel.String())
|
||||
if len(features.All()) > 0 {
|
||||
b.commandArgs = append(b.commandArgs, "--features", features.Serialize())
|
||||
}
|
||||
// exclude "velero" and "server" from "velero server --flags ..."
|
||||
b.commandArgs = append(b.commandArgs, os.Args[2:]...)
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user