From 85b5b32a0975edcd1da188addf0b781feb23950e Mon Sep 17 00:00:00 2001 From: Ian Gann Date: Thu, 23 Jul 2026 14:23:01 -0700 Subject: [PATCH] VKAL-40713: add PreExistingVPCNetworkConfigAnnotation constant Add the constant that NamespaceNetworkConfiguration reacts to for adopting a pre-existing VPCNetworkConfiguration named ahead of the NNC, instead of always creating one named after the NNC itself. Needed for brownfield namespaces migrating from the legacy wcpsvc/VCDB path. Bug number: VKAL-40713 AI-Tool-Used: claude AI-Model-Used: claude-sonnet-5 AI-Tool-Use-Level: high AI-Code-Category: production AI-Time-Saved: 1 Testing Done: go build ./... --- api/v1alpha1/namespacenetworkconfiguration_types.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/v1alpha1/namespacenetworkconfiguration_types.go b/api/v1alpha1/namespacenetworkconfiguration_types.go index 62ec0f2..de97950 100644 --- a/api/v1alpha1/namespacenetworkconfiguration_types.go +++ b/api/v1alpha1/namespacenetworkconfiguration_types.go @@ -20,6 +20,14 @@ const ( // resource. NamespaceNetworkProtectionFinalizer = "netoperator.vmware.com/nnc-protection" + // PreExistingVPCNetworkConfigAnnotation, when set on a + // NamespaceNetworkConfiguration, names a pre-existing VPCNetworkConfiguration + // for net-operator's VPC reconciler to adopt in place of the CR it would + // otherwise auto-create (named after this resource). This supports brownfield + // namespaces whose VPCNetworkConfiguration was provisioned before adoption by + // this NamespaceNetworkConfiguration. + PreExistingVPCNetworkConfigAnnotation = "netoperator.vmware.com/vpc-network-configuration" + // NamespaceNetworkConditionReady is True when all networking resources owned // by the NamespaceNetworkConfiguration have been created and every associated // Namespace has been fully reconciled. When no Namespaces are associated,