add validation for cluster name

Signed-off-by: yuswift <yuswift2018@gmail.com>
This commit is contained in:
yuswift
2021-09-09 15:17:32 +08:00
parent b0506c35a4
commit afca5672d6
2 changed files with 15 additions and 1 deletions

View File

@@ -139,6 +139,7 @@ func (s *KubeSphereControllerManagerOptions) Validate() []error {
errs = append(errs, s.OpenPitrixOptions.Validate()...)
errs = append(errs, s.NetworkOptions.Validate()...)
errs = append(errs, s.LdapOptions.Validate()...)
errs = append(errs, s.MultiClusterOptions.Validate()...)
if len(s.ApplicationSelector) != 0 {
_, err := labels.Parse(s.ApplicationSelector)