Merge pull request #2615 from RachaelLuo/fix/fix-cordon

Add args greater than one
This commit is contained in:
karmada-bot 2022-10-09 15:24:21 +08:00 committed by GitHub
commit 789a44acfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ func (o *CommandCordonOption) Complete(args []string) error {
if len(args) == 0 {
return errors.New("cluster name is required")
}
if len(args) > 1 {
return errors.New("more than one cluster name is not supported")
}
o.ClusterName = args[0]
return nil
}