func NewNodeList() *NodeList {
	return &NodeList{
		TypeMeta: metav1.TypeMeta{
			Kind:       KindNodeList,
			APIVersion: apiv3.GroupVersionCurrent,
		},
	}
}
NewNodeList creates a new (zeroed) NodeList struct with the TypeMetadata initialised to the current
version.
package v3
import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	"github.com/projectcalico/api/pkg/lib/numorstring"
)
const (
	KindNode     = "Node"
	KindNodeList = "NodeList"
	CalicoNodeIP = "CalicoNodeIP"
	InternalIP   = "InternalIP"
	ExternalIP   = "ExternalIP"
)
type Node struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec NodeSpec `json:"spec,omitempty"`
	Status NodeStatus `json:"status,omitempty"`
}
type NodeSpec struct {
	BGP *NodeBGPSpec `json:"bgp,omitempty" validate:"omitempty"`
	IPv4VXLANTunnelAddr string `json:"ipv4VXLANTunnelAddr,omitempty" validate:"omitempty,ipv4"`
	VXLANTunnelMACAddr string `json:"vxlanTunnelMACAddr,omitempty" validate:"omitempty,mac"`
	OrchRefs []OrchRef `json:"orchRefs,omitempty" validate:"omitempty"`
	Wireguard *NodeWireguardSpec `json:"wireguard,omitempty" validate:"omitempty"`
	Addresses []NodeAddress `json:"addresses,omitempty" validate:"omitempty"`
}
type NodeAddress struct {
	Address string `json:"address" validate:"net"`
	Type string `json:"type,omitempty" validate:"omitempty,ipType"`
}
type NodeStatus struct {
	WireguardPublicKey string `json:"wireguardPublicKey,omitempty" validate:"omitempty,wireguardPublicKey"`
	PodCIDRs []string `json:"podCIDRs,omitempty" validate:"omitempty"`
}
type OrchRef struct {
	NodeName string `json:"nodeName,omitempty" validate:"omitempty"`
	Orchestrator string `json:"orchestrator"`
}
type NodeBGPSpec struct {
	ASNumber *numorstring.ASNumber `json:"asNumber,omitempty"`
	IPv4Address string `json:"ipv4Address,omitempty" validate:"omitempty,cidrv4"`
	IPv6Address string `json:"ipv6Address,omitempty" validate:"omitempty,cidrv6"`
	IPv4IPIPTunnelAddr string `json:"ipv4IPIPTunnelAddr,omitempty" validate:"omitempty,ipv4"`
	RouteReflectorClusterID string `json:"routeReflectorClusterID,omitempty" validate:"omitempty,ipv4"`
}
type NodeWireguardSpec struct {
	InterfaceIPv4Address string `json:"interfaceIPv4Address,omitempty" validate:"omitempty,ipv4"`
}
type NodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Node `json:"items"`
}
func NewNode() *Node {
	return &Node{
		TypeMeta: metav1.TypeMeta{
			Kind:       KindNode,
			APIVersion: apiv3.GroupVersionCurrent,
		},
	}
}