Implement Mixed Mode State Detection#1396
Open
heypnus wants to merge 1 commit intovmware-tanzu:mainfrom
Open
Conversation
Replace the global boolean cf.CoeConfig.EnableVPCNetwork with namespace-label-driven mixed-mode state: HasT1Namespaces and HasVPCNamespaces. New module: pkg/config/mixed_mode.go - Checks SupervisorCapabilities CRD (iaas.vmware.com/v1alpha1) for supports_per_namespace_network_providers capability. - If supported: scans namespace labels (iaas.vmware.com/network-provider) to derive HasT1Namespaces (nsx-t1) and HasVPCNamespaces (nsx-vpc or vsphere-network). - If not supported (legacy/pre-9.2): falls back to EnableVPCNetwork config flag. - Provides InitializeMixedModeState(), RefreshMixedModeState(), HasT1Namespaces(), HasVPCNamespaces(), GetNamespaceNetworkProvider() APIs. This enables NSX Operator to run in mixed mode where both T1 and VPC namespaces coexist, as required for VDS->VPC and T1->VPC migration. Testing done: WIP
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (16.91%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1396 +/- ##
==========================================
- Coverage 76.75% 76.39% -0.37%
==========================================
Files 151 152 +1
Lines 21308 21436 +128
==========================================
+ Hits 16356 16376 +20
- Misses 3783 3892 +109
+ Partials 1169 1168 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the global boolean cf.CoeConfig.EnableVPCNetwork with namespace-label-driven mixed-mode state: HasT1Namespaces and HasVPCNamespaces.
New module: pkg/config/mixed_mode.go
This enables NSX Operator to run in mixed mode where both T1 and VPC namespaces coexist, as required for VDS->VPC and T1->VPC migration.
Testing done: WIP