diff --git a/.gitignore b/.gitignore index 1556469..1692fa8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# IDEs +.vscode + # Binaries for programs and plugins *.exe *.exe~ diff --git a/api/v1alpha1/networktopologyprovider_types.go b/api/v1alpha1/networktopologyprovider_types.go new file mode 100644 index 0000000..43fd646 --- /dev/null +++ b/api/v1alpha1/networktopologyprovider_types.go @@ -0,0 +1,59 @@ +// Copyright (c) 2026 Broadcom. All Rights Reserved. +// Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +// and/or its subsidiaries. + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type TypedObjectReference struct { + // APIGroup is the group for the resource being referenced. + APIGroup string `json:"apiGroup"` + // Kind is the type of resource being referenced. + Kind string `json:"kind"` + // Name is the name of resource being referenced. + Name string `json:"name"` +} + +type NetworkTopologyType string + +const ( + // NetworkTopologyTypeNSXT is the type for NSX Container Plugin Tier1-per-namespace network topology. + NetworkTopologyTypeNSXT NetworkTopologyType = "nsx-t" + // NetworkTopologyTypeVDS is the type for vSphere Networking topology. + NetworkTopologyTypeVDS NetworkTopologyType = "vsphere-distributed" + // NetworkTopologyTypeNSXTVPC is the type for NSX-T VPC network topology. + NetworkTopologyTypeNSXTVPC NetworkTopologyType = "nsx-t_vpc" +) + +type NetworkTopologyProviderSpec struct { + // Type describes type of network topology. + // +kubebuilder:validation:Enum=nsx-t;vsphere-distributed;nsx-t_vpc + Type NetworkTopologyType `json:"type"` + // ProviderRef is reference to a network topology provider object that provides the details for this type of network topology provider. + ProviderRef TypedObjectReference `json:"providerRef"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=ntp,scope=Cluster + +// NetworkTopologyProvider is the Schema for the networktopologyproviders API. +// A NetworkTopologyProvider represents a network topology provider configuration. +type NetworkTopologyProvider struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec NetworkTopologyProviderSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +type NetworkTopologyProviderList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NetworkTopologyProvider `json:"items"` +} + +func init() { + RegisterTypeWithScheme(&NetworkTopologyProvider{}, &NetworkTopologyProviderList{}) +} diff --git a/api/v1alpha1/nsxtnetworktopologyprovider_types.go b/api/v1alpha1/nsxtnetworktopologyprovider_types.go new file mode 100644 index 0000000..75a2a5a --- /dev/null +++ b/api/v1alpha1/nsxtnetworktopologyprovider_types.go @@ -0,0 +1,53 @@ +// Copyright (c) 2026 Broadcom. All Rights Reserved. +// Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +// and/or its subsidiaries. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type NSXTNetworkTopologyProviderSpec struct { + // PodCidrs specifies the CIDR blocks for Pod networking. + PodCidrs []string `json:"podCidrs,omitempty"` + // IngressCidrs specifies the CIDR blocks for ingress traffic. + IngressCidrs []string `json:"ingressCidrs,omitempty"` + // EgressCidrs specifies the CIDR blocks for egress traffic. + EgressCidrs []string `json:"egressCidrs,omitempty"` + // ClusterDistributedSwitch is the vSphere Distributed Switch used for the cluster. + ClusterDistributedSwitch *string `json:"clusterDistributedSwitch,omitempty"` + // NsxEdgeCluster is the NSX-T Edge Cluster ID. + NsxEdgeCluster *string `json:"nsxEdgeCluster,omitempty"` + // NsxTier0Gateway is the NSX-T Tier-0 gateway path used for the Supervisor's Tier-1 gateway uplink. + NsxTier0Gateway *string `json:"nsxTier0Gateway,omitempty"` + // NamespaceSubnetPrefix is the subnet prefix size for namespaces. + NamespaceSubnetPrefix *int32 `json:"namespaceSubnetPrefix,omitempty"` + // RoutedMode indicates whether routed mode is enabled. + RoutedMode *bool `json:"routedMode,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=nsxtntp,scope=Cluster + +// NSXTNetworkTopologyProvider is the Schema for the nsxtnetworktopologyproviders API. +// A NSXTNetworkTopologyProvider represents a topology provider for NSX-T networks for a Supervisor. +type NSXTNetworkTopologyProvider struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec NSXTNetworkTopologyProviderSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// NSXTNetworkTopologyProviderList contains a list of NSXTNetworkTopologyProvider. +type NSXTNetworkTopologyProviderList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NSXTNetworkTopologyProvider `json:"items"` +} + +func init() { + RegisterTypeWithScheme(&NSXTNetworkTopologyProvider{}, &NSXTNetworkTopologyProviderList{}) +} diff --git a/api/v1alpha1/nsxtvpcnetworktopologyprovider_types.go b/api/v1alpha1/nsxtvpcnetworktopologyprovider_types.go new file mode 100644 index 0000000..9621ee9 --- /dev/null +++ b/api/v1alpha1/nsxtvpcnetworktopologyprovider_types.go @@ -0,0 +1,48 @@ +// Copyright (c) 2026 Broadcom. All Rights Reserved. +// Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +// and/or its subsidiaries. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type NSXTVPCNetworkTopologyProviderSpec struct { + // NsxProject is the default Project for VPCs in the Supervisor, including the System VPC, and Supervisor Services + // VPC. It needs to be NSX path of Project. + NsxProject *string `json:"nsxProject,omitempty"` + // VpcConnectivityProfile is the configuration for how a VPC is constructed, including it's Transit Gateway + // Attachments, IP blocks, and other settings on NSX. It needs to be NSX path of VPC Connectivity Profile. + VpcConnectivityProfile *string `json:"vpcConnectivityProfile,omitempty"` + // DefaultPrivateCidrs specifies CIDR blocks from which private subnets are allocated. This range must not overlap + // with those in VpcConnectivityProfile, the Supervisor's Service CIDR, or other services running in the datacenter. + // You must have at least one CIDR of size 16 or larger to enable Supervisor with VPC networking. + // If Avi is used, another CIDR of size 64 is needed. + DefaultPrivateCidrs []string `json:"defaultPrivateCidrs,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=nsxtvpcntp,scope=Cluster + +// NSXTVPCNetworkTopologyProvider is the Schema for the nsxtvpcnetworktopologyproviders API. +// A NSXTVPCNetworkTopologyProvider represents a topology provider for NSX VPC networks for a Supervisor. +type NSXTVPCNetworkTopologyProvider struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec NSXTVPCNetworkTopologyProviderSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// NSXTVPCNetworkTopologyProviderList contains a list of NSXTVPCNetworkTopologyProvider. +type NSXTVPCNetworkTopologyProviderList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []NSXTVPCNetworkTopologyProvider `json:"items"` +} + +func init() { + RegisterTypeWithScheme(&NSXTVPCNetworkTopologyProvider{}, &NSXTVPCNetworkTopologyProviderList{}) +} diff --git a/api/v1alpha1/vspheredistributednetworktopologyprovider_types.go b/api/v1alpha1/vspheredistributednetworktopologyprovider_types.go new file mode 100644 index 0000000..5e9540a --- /dev/null +++ b/api/v1alpha1/vspheredistributednetworktopologyprovider_types.go @@ -0,0 +1,38 @@ +// Copyright (c) 2026 Broadcom. All Rights Reserved. +// Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +// and/or its subsidiaries. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type VSphereDistributedNetworkTopologyProviderSpec struct { + // TODO: placeholder. Unclear if anything is needed here. +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=vdsntp,scope=Cluster + +// VSphereDistributedNetworkTopologyProvider is the Schema for the vspheredistributednetworktopologyproviders API. +// A VSphereDistributedNetworkTopologyProvider represents a topology provider for vSphere distributed networks for a Supervisor. +type VSphereDistributedNetworkTopologyProvider struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VSphereDistributedNetworkTopologyProviderSpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// VSphereDistributedNetworkTopologyProviderList contains a list of VSphereDistributedNetworkTopologyProvider. +type VSphereDistributedNetworkTopologyProviderList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VSphereDistributedNetworkTopologyProvider `json:"items"` +} + +func init() { + RegisterTypeWithScheme(&VSphereDistributedNetworkTopologyProvider{}, &VSphereDistributedNetworkTopologyProviderList{}) +} diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 880c573..acc9694 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -893,6 +893,207 @@ func (in *MacManagementPolicy) DeepCopy() *MacManagementPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTNetworkTopologyProvider) DeepCopyInto(out *NSXTNetworkTopologyProvider) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTNetworkTopologyProvider. +func (in *NSXTNetworkTopologyProvider) DeepCopy() *NSXTNetworkTopologyProvider { + if in == nil { + return nil + } + out := new(NSXTNetworkTopologyProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NSXTNetworkTopologyProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTNetworkTopologyProviderList) DeepCopyInto(out *NSXTNetworkTopologyProviderList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NSXTNetworkTopologyProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTNetworkTopologyProviderList. +func (in *NSXTNetworkTopologyProviderList) DeepCopy() *NSXTNetworkTopologyProviderList { + if in == nil { + return nil + } + out := new(NSXTNetworkTopologyProviderList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NSXTNetworkTopologyProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTNetworkTopologyProviderSpec) DeepCopyInto(out *NSXTNetworkTopologyProviderSpec) { + *out = *in + if in.PodCidrs != nil { + in, out := &in.PodCidrs, &out.PodCidrs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IngressCidrs != nil { + in, out := &in.IngressCidrs, &out.IngressCidrs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.EgressCidrs != nil { + in, out := &in.EgressCidrs, &out.EgressCidrs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ClusterDistributedSwitch != nil { + in, out := &in.ClusterDistributedSwitch, &out.ClusterDistributedSwitch + *out = new(string) + **out = **in + } + if in.NsxEdgeCluster != nil { + in, out := &in.NsxEdgeCluster, &out.NsxEdgeCluster + *out = new(string) + **out = **in + } + if in.NsxTier0Gateway != nil { + in, out := &in.NsxTier0Gateway, &out.NsxTier0Gateway + *out = new(string) + **out = **in + } + if in.NamespaceSubnetPrefix != nil { + in, out := &in.NamespaceSubnetPrefix, &out.NamespaceSubnetPrefix + *out = new(int32) + **out = **in + } + if in.RoutedMode != nil { + in, out := &in.RoutedMode, &out.RoutedMode + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTNetworkTopologyProviderSpec. +func (in *NSXTNetworkTopologyProviderSpec) DeepCopy() *NSXTNetworkTopologyProviderSpec { + if in == nil { + return nil + } + out := new(NSXTNetworkTopologyProviderSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTVPCNetworkTopologyProvider) DeepCopyInto(out *NSXTVPCNetworkTopologyProvider) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTVPCNetworkTopologyProvider. +func (in *NSXTVPCNetworkTopologyProvider) DeepCopy() *NSXTVPCNetworkTopologyProvider { + if in == nil { + return nil + } + out := new(NSXTVPCNetworkTopologyProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NSXTVPCNetworkTopologyProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTVPCNetworkTopologyProviderList) DeepCopyInto(out *NSXTVPCNetworkTopologyProviderList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NSXTVPCNetworkTopologyProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTVPCNetworkTopologyProviderList. +func (in *NSXTVPCNetworkTopologyProviderList) DeepCopy() *NSXTVPCNetworkTopologyProviderList { + if in == nil { + return nil + } + out := new(NSXTVPCNetworkTopologyProviderList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NSXTVPCNetworkTopologyProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NSXTVPCNetworkTopologyProviderSpec) DeepCopyInto(out *NSXTVPCNetworkTopologyProviderSpec) { + *out = *in + if in.NsxProject != nil { + in, out := &in.NsxProject, &out.NsxProject + *out = new(string) + **out = **in + } + if in.VpcConnectivityProfile != nil { + in, out := &in.VpcConnectivityProfile, &out.VpcConnectivityProfile + *out = new(string) + **out = **in + } + if in.DefaultPrivateCidrs != nil { + in, out := &in.DefaultPrivateCidrs, &out.DefaultPrivateCidrs + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSXTVPCNetworkTopologyProviderSpec. +func (in *NSXTVPCNetworkTopologyProviderSpec) DeepCopy() *NSXTVPCNetworkTopologyProviderSpec { + if in == nil { + return nil + } + out := new(NSXTVPCNetworkTopologyProviderSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Network) DeepCopyInto(out *Network) { *out = *in @@ -1230,6 +1431,80 @@ func (in *NetworkStatus) DeepCopy() *NetworkStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkTopologyProvider) DeepCopyInto(out *NetworkTopologyProvider) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkTopologyProvider. +func (in *NetworkTopologyProvider) DeepCopy() *NetworkTopologyProvider { + if in == nil { + return nil + } + out := new(NetworkTopologyProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkTopologyProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkTopologyProviderList) DeepCopyInto(out *NetworkTopologyProviderList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NetworkTopologyProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkTopologyProviderList. +func (in *NetworkTopologyProviderList) DeepCopy() *NetworkTopologyProviderList { + if in == nil { + return nil + } + out := new(NetworkTopologyProviderList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkTopologyProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkTopologyProviderSpec) DeepCopyInto(out *NetworkTopologyProviderSpec) { + *out = *in + out.ProviderRef = in.ProviderRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkTopologyProviderSpec. +func (in *NetworkTopologyProviderSpec) DeepCopy() *NetworkTopologyProviderSpec { + if in == nil { + return nil + } + out := new(NetworkTopologyProviderSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SingleNodeAvailabilityMode) DeepCopyInto(out *SingleNodeAvailabilityMode) { *out = *in @@ -1245,6 +1520,21 @@ func (in *SingleNodeAvailabilityMode) DeepCopy() *SingleNodeAvailabilityMode { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TypedObjectReference) DeepCopyInto(out *TypedObjectReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedObjectReference. +func (in *TypedObjectReference) DeepCopy() *TypedObjectReference { + if in == nil { + return nil + } + out := new(TypedObjectReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VLANTrunkRange) DeepCopyInto(out *VLANTrunkRange) { *out = *in @@ -1476,6 +1766,79 @@ func (in *VSphereDistributedNetworkStatus) DeepCopy() *VSphereDistributedNetwork return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDistributedNetworkTopologyProvider) DeepCopyInto(out *VSphereDistributedNetworkTopologyProvider) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDistributedNetworkTopologyProvider. +func (in *VSphereDistributedNetworkTopologyProvider) DeepCopy() *VSphereDistributedNetworkTopologyProvider { + if in == nil { + return nil + } + out := new(VSphereDistributedNetworkTopologyProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VSphereDistributedNetworkTopologyProvider) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDistributedNetworkTopologyProviderList) DeepCopyInto(out *VSphereDistributedNetworkTopologyProviderList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VSphereDistributedNetworkTopologyProvider, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDistributedNetworkTopologyProviderList. +func (in *VSphereDistributedNetworkTopologyProviderList) DeepCopy() *VSphereDistributedNetworkTopologyProviderList { + if in == nil { + return nil + } + out := new(VSphereDistributedNetworkTopologyProviderList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VSphereDistributedNetworkTopologyProviderList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VSphereDistributedNetworkTopologyProviderSpec) DeepCopyInto(out *VSphereDistributedNetworkTopologyProviderSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDistributedNetworkTopologyProviderSpec. +func (in *VSphereDistributedNetworkTopologyProviderSpec) DeepCopy() *VSphereDistributedNetworkTopologyProviderSpec { + if in == nil { + return nil + } + out := new(VSphereDistributedNetworkTopologyProviderSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VSphereDistributedPortConfig) DeepCopyInto(out *VSphereDistributedPortConfig) { *out = *in diff --git a/hack/client-gen.sh b/hack/client-gen.sh index aea066b..9260486 100755 --- a/hack/client-gen.sh +++ b/hack/client-gen.sh @@ -17,14 +17,14 @@ CLIENTSET_NAME=clientset HEADER_FILE=hack/boilerplate/boilerplate.go.txt $TOOLS_PATH/client-gen --go-header-file $HEADER_FILE --input-base $PKG/api --input /$VERSION \ - --clientset-path $CLIENTGEN_PATH --clientset-name $CLIENTSET_NAME + --clientset-path $CLIENTGEN_PATH --clientset-name $CLIENTSET_NAME --output-base $TOPLEVEL mv $TOPLEVEL/$PKG/pkg/client/clientset_generated/clientset/typed/v1alpha1/_client.go $TOPLEVEL/$PKG/pkg/client/clientset_generated/clientset/typed/v1alpha1/client.go -$TOOLS_PATH/lister-gen --input-dirs $PKG/api/$VERSION --go-header-file $HEADER_FILE --output-package $LISTERGEN_PATH +$TOOLS_PATH/lister-gen --input-dirs $PKG/api/$VERSION --go-header-file $HEADER_FILE --output-package $LISTERGEN_PATH --output-base $TOPLEVEL $TOOLS_PATH/informer-gen --single-directory --input-dirs $PKG/api/$VERSION --go-header-file $HEADER_FILE \ - --output-package $INFORMERGEN_PATH --listers-package $LISTERGEN_PATH --versioned-clientset-package $CLIENTGEN_PATH/$CLIENTSET_NAME + --output-package $INFORMERGEN_PATH --listers-package $LISTERGEN_PATH --versioned-clientset-package $CLIENTGEN_PATH/$CLIENTSET_NAME --output-base $TOPLEVEL # Move to top level so that samples can consume the via the top-level import. # while taking care to avoid other artifacts potentially in pkg.