Skip to content

Commit

Permalink
chore: skip validate restore in webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
wusai80 committed Sep 20, 2024
1 parent 4a02a0c commit 9b1fc56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apis/apps/v1alpha1/opsrequest_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ func (r *OpsRequest) validateEntry(isCreate bool) error {
if webhookMgr == nil || webhookMgr.client == nil {
return nil
}
// skip validating restore
if r.Spec.Type == RestoreType {
return nil
}

ctx := context.Background()
k8sClient := webhookMgr.client
cluster, err := r.getCluster(ctx, k8sClient)
Expand Down

0 comments on commit 9b1fc56

Please sign in to comment.