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:
Wenkai Yin(尹文开)
2024-07-23 14:54:41 +08:00
parent 981f30cb25
commit dc6eeafe98
22 changed files with 500 additions and 483 deletions

View File

@@ -32,6 +32,7 @@ import (
"github.com/vmware-tanzu/velero/internal/velero"
velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
"github.com/vmware-tanzu/velero/pkg/buildinfo"
"github.com/vmware-tanzu/velero/pkg/constant"
"github.com/vmware-tanzu/velero/pkg/plugin/framework"
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
)
@@ -77,7 +78,7 @@ func NewServerStatusRequestReconciler(
func (r *serverStatusRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
log := r.log.WithFields(logrus.Fields{
"controller": ServerStatusRequest,
"controller": constant.ControllerServerStatusRequest,
"serverStatusRequest": req.NamespacedName,
})
@@ -95,7 +96,7 @@ func (r *serverStatusRequestReconciler) Reconcile(ctx context.Context, req ctrl.
}
log = r.log.WithFields(logrus.Fields{
"controller": ServerStatusRequest,
"controller": constant.ControllerServerStatusRequest,
"serverStatusRequest": req.NamespacedName,
"phase": statusRequest.Status.Phase,
})