From 69b0a3b43b587ed1813de8ebc7a722e8a05cba3c Mon Sep 17 00:00:00 2001 From: lxiaopei Date: Mon, 13 Feb 2023 11:08:00 +0800 Subject: [PATCH] Remove appliedToNamespaces field from VPCNetworkConfiguration As discussed, we will remove appliedToNamespaces filed in VPCNetworkConfiguration CR, a label will be added on Namespace to specify the VPCNetworkConfiguration it uses. --- build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml | 6 ------ pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go | 3 --- pkg/apis/v1alpha1/zz_generated.deepcopy.go | 5 ----- 3 files changed, 14 deletions(-) diff --git a/build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml b/build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml index 847567856..6dd83f177 100644 --- a/build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml +++ b/build/yaml/crd/nsx.vmware.com_vpcnetworkconfigurations.yaml @@ -54,12 +54,6 @@ spec: When a field is not set in a Namespace's VPCNetworkConfiguration, the Namespace will use the value in the default VPCNetworkConfiguration. properties: - appliedToNamespaces: - description: Namespaces to be applied. The default VPCNetworkConfiguration - will not have AppliedToNamespaces set. - items: - type: string - type: array defaultGatewayPath: description: PolicyPath of Tier0 or Tier0 VRF gateway. type: string diff --git a/pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go b/pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go index 27a3cac94..c29011d54 100644 --- a/pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go +++ b/pkg/apis/v1alpha1/vpcnetworkconfiguration_types.go @@ -19,9 +19,6 @@ const ( // in a Namespace's VPCNetworkConfiguration, the Namespace will use the value // in the default VPCNetworkConfiguration. type VPCNetworkConfigurationSpec struct { - // Namespaces to be applied. - // The default VPCNetworkConfiguration will not have AppliedToNamespaces set. - AppliedToNamespaces []string `json:"appliedToNamespaces,omitempty"` // PolicyPath of Tier0 or Tier0 VRF gateway. DefaultGatewayPath string `json:"defaultGatewayPath,omitempty"` // Edge cluster path on which the networking elements will be created. diff --git a/pkg/apis/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/v1alpha1/zz_generated.deepcopy.go index 54b1a19b8..27a023250 100644 --- a/pkg/apis/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/v1alpha1/zz_generated.deepcopy.go @@ -1153,11 +1153,6 @@ func (in *VPCNetworkConfigurationList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VPCNetworkConfigurationSpec) DeepCopyInto(out *VPCNetworkConfigurationSpec) { *out = *in - if in.AppliedToNamespaces != nil { - in, out := &in.AppliedToNamespaces, &out.AppliedToNamespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } if in.PublicIPv4Blocks != nil { in, out := &in.PublicIPv4Blocks, &out.PublicIPv4Blocks *out = make([]string, len(*in))