From 51e997c438c0e033fef70b88ea092683e1d1f32e Mon Sep 17 00:00:00 2001 From: lxiaopei Date: Mon, 14 Aug 2023 10:55:18 +0800 Subject: [PATCH] Remove validation check for default_project and external_ipv4_blocks "Project" and "External_ipv4_blocks" are retrieved from VPCNetworkConfiguration CR instead of NCP ConfigMap. Remove the validation check for these 2 options. --- pkg/config/config.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 5f7125081..5ef6d864f 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -292,14 +292,6 @@ func (nsxConfig *NsxConfig) validate(enableVPC bool) error { if err := nsxConfig.validateCert(); err != nil { return err } - nsxConfig.ExternalIPv4Blocks = removeEmptyItem(nsxConfig.ExternalIPv4Blocks) - if enableVPC { - if nsxConfig.DefaultProject == "" || len(nsxConfig.ExternalIPv4Blocks) == 0 { - err := errors.New("default_project is none or external_ipv4_blocks is empty") - log.Error(err, "validate VPCConfig failed") - return err - } - } return nil }