Documentation ¶
Overview ¶
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package v1alpha is the v1alpha version of the API. +kubebuilder:object:generate=true +groupName=networking.gke.io
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func MarshalAnnotation(a interface{}) (string, error)
- func MarshalNodeNetworkAnnotation(a NodeNetworkAnnotation) (string, error)
- func Resource(resource string) schema.GroupResource
- type DNSConfig
- type DeviceModeType
- type GKENetworkParamSet
- type GKENetworkParamSetList
- type GKENetworkParamSetSpec
- type GKENetworkParamSetStatus
- type InterfaceAnnotation
- type InterfaceRef
- type L2NetworkConfig
- type LifecycleType
- type Network
- type NetworkInterface
- type NetworkInterfaceList
- type NetworkInterfaceSpec
- type NetworkInterfaceStatus
- type NetworkList
- type NetworkRanges
- type NetworkSpec
- type NetworkStatus
- type NetworkType
- type NodeInterfaceMatcher
- type NodeNetworkAnnotation
- type NodeNetworkStatus
- type Route
- type SecondaryRanges
Constants ¶
const ( // DisableSourceValidationAnnotationKey is the annotation on pod to disable source IP validation on L2 interfaces. // Useful when you want to assign new IPs onto the interface. DisableSourceIPValidationAnnotationKey = "networking.gke.io/disable-source-ip-validation" // DisableSourceValidationAnnotationValTrue is the value to disable source IP validation for the pod. DisableSourceIPValidationAnnotationValTrue = "true" // DefaultInterfaceAnnotationKey specifies the default route interface with interface name in pod. // The IP of the gateway comes from network CRs. DefaultInterfaceAnnotationKey = "networking.gke.io/default-interface" // InterfaceAnnotationKey specifies interfaces for pod. InterfaceAnnotationKey = "networking.gke.io/interfaces" // NodeNetworkAnnotationKey is the key of the annotation which indicates the status of // networks on the node. NodeNetworkAnnotationKey = "networking.gke.io/network-status" // NetworkAnnotationKey is the network annotation on NetworkPolicy object. // Value for this key will be the network on which network policy should be enforced. NetworkAnnotationKey = "networking.gke.io/network" // NetworkInUseAnnotationKey is the annotation on Network object. // It's used to indicate if the Network object is referenced by NetworkInterface/pod objects. NetworkInUseAnnotationKey = "networking.gke.io/in-use" // NetworkInUseAnnotationValTrue is the value to be set for NetworkInUseAnnotationKey to indicate // the Network object is referenced by at least one NetworkInterface/pod object. NetworkInUseAnnotationValTrue = "true" )
Annotations on pods.
const (
// DefaultNetworkName is the network used by the VETH interface.
DefaultNetworkName = "pod-network"
)
const GroupName = "networking.gke.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Deprecated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func MarshalAnnotation ¶
MarshalAnnotation marshals any object into string using json.Marshal.
func MarshalNodeNetworkAnnotation ¶
func MarshalNodeNetworkAnnotation(a NodeNetworkAnnotation) (string, error)
MarshalNodeNetworkAnnotation marshals a NodeNetworkAnnotation into string.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type DNSConfig ¶
type DNSConfig struct { // A list of nameserver IP addresses. // Duplicated nameservers will be removed. // +required // +kubebuilder:validation:MinItems:=1 Nameservers []string `json:"nameservers"` // A list of DNS search domains for host-name lookup. // Duplicated search paths will be removed. // +optional Searches []string `json:"searches,omitempty"` }
DNSConfig defines the DNS configuration of a network. The fields follow k8s pod dnsConfig structure: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/core/v1/types.go#L3555
func (*DNSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig.
func (*DNSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceModeType ¶
type DeviceModeType string
DeviceModeType defines mode in which the devices will be used by the Pod +kubebuilder:validation:Enum=DPDK-VFIO;NetDevice
const ( // DPDKVFIO indicates that NICs are bound to vfio-pci driver DPDKVFIO DeviceModeType = "DPDK-VFIO" // NetDevice indicates that NICs are bound to kernel driver and used as net device NetDevice DeviceModeType = "NetDevice" )
type GKENetworkParamSet ¶
type GKENetworkParamSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GKENetworkParamSetSpec `json:"spec,omitempty"` Status GKENetworkParamSetStatus `json:"status,omitempty"` }
GKENetworkParamSet represent GKE specific parameters for the network.
func (*GKENetworkParamSet) DeepCopy ¶
func (in *GKENetworkParamSet) DeepCopy() *GKENetworkParamSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKENetworkParamSet.
func (*GKENetworkParamSet) DeepCopyInto ¶
func (in *GKENetworkParamSet) DeepCopyInto(out *GKENetworkParamSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GKENetworkParamSet) DeepCopyObject ¶
func (in *GKENetworkParamSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GKENetworkParamSetList ¶
type GKENetworkParamSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is a slice of GKENetworkParamset resources. Items []GKENetworkParamSet `json:"items"` }
GKENetworkParamSetList contains a list of GKENetworkParamSet resources.
func (*GKENetworkParamSetList) DeepCopy ¶
func (in *GKENetworkParamSetList) DeepCopy() *GKENetworkParamSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKENetworkParamSetList.
func (*GKENetworkParamSetList) DeepCopyInto ¶
func (in *GKENetworkParamSetList) DeepCopyInto(out *GKENetworkParamSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GKENetworkParamSetList) DeepCopyObject ¶
func (in *GKENetworkParamSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GKENetworkParamSetSpec ¶
type GKENetworkParamSetSpec struct { // VPC speficies the VPC to which the network belongs. // +required VPC string `json:"vpc"` // VPCSubnet is the path of the VPC subnet // +required VPCSubnet string `json:"vpcSubnet"` // DeviceMode indicates the mode in which the devices will be used by the Pod. // This field is required and valid only for "Device" typed network // +optional DeviceMode DeviceModeType `json:"deviceMode"` // PodIPv4Ranges specify the names of the secondary ranges of the VPC subnet // used to allocate pod IPs for the network. // This field is required and valid only for L3 typed network // +optional PodIPv4Ranges *SecondaryRanges `json:"podIPv4Ranges,omitempty"` }
GKENetworkParamSetSpec contains the specifications for network object
func (*GKENetworkParamSetSpec) DeepCopy ¶
func (in *GKENetworkParamSetSpec) DeepCopy() *GKENetworkParamSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKENetworkParamSetSpec.
func (*GKENetworkParamSetSpec) DeepCopyInto ¶
func (in *GKENetworkParamSetSpec) DeepCopyInto(out *GKENetworkParamSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GKENetworkParamSetStatus ¶
type GKENetworkParamSetStatus struct { // PodCIDRs specifies the CIDRs from which IPs will be used for Pod interfaces // +optional PodCIDRs *NetworkRanges `json:"podCIDRs,omitempty"` // Conditions is a field representing the current conditions of the GKENetworkParamSet. // // Known condition types are: // // * "Ready" // // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // NetworkName specifies which Network object is currently referencing this GKENetworkParamSet // +optional NetworkName string `json:"networkName"` }
GKENetworkParamSetStatus contains the status information related to the network.
func (*GKENetworkParamSetStatus) DeepCopy ¶
func (in *GKENetworkParamSetStatus) DeepCopy() *GKENetworkParamSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKENetworkParamSetStatus.
func (*GKENetworkParamSetStatus) DeepCopyInto ¶
func (in *GKENetworkParamSetStatus) DeepCopyInto(out *GKENetworkParamSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InterfaceAnnotation ¶
type InterfaceAnnotation []InterfaceRef
InterfaceAnnotation is the value of the interface annotation. +kubebuilder:object:generate:=false
func ParseInterfaceAnnotation ¶
func ParseInterfaceAnnotation(annotation string) (InterfaceAnnotation, error)
ParseInterfaceAnnotation parses the given annotation.
type InterfaceRef ¶
type InterfaceRef struct { // InterfaceName is the name of the interface in pod network namespace. InterfaceName string `json:"interfaceName,omitempty"` // Network refers to a network object within the cluster. // When network is specified, NetworkInterface object is optionally generated with default configuration. Network *string `json:"network,omitempty"` // Interface reference the NetworkInterface object within the namespace. Interface *string `json:"interface,omitempty"` }
InterfaceRef specifies the reference to network interface. All fields are mutual exclusive. Either Network or Interface field can be specified. +kubebuilder:object:generate:=false
type L2NetworkConfig ¶
type L2NetworkConfig struct { // VlanID is the vlan ID used for the network. // If unspecified, vlan tagging is not enabled. // +optional // +kubebuilder:validation:Maximum=4094 // +kubebuilder:validation:Minimum=1 VlanID *int32 `json:"vlanID,omitempty"` }
L2NetworkConfig contains configurations for L2 type network.
func (*L2NetworkConfig) DeepCopy ¶
func (in *L2NetworkConfig) DeepCopy() *L2NetworkConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L2NetworkConfig.
func (*L2NetworkConfig) DeepCopyInto ¶
func (in *L2NetworkConfig) DeepCopyInto(out *L2NetworkConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LifecycleType ¶
type LifecycleType string
LifecycleType defines who manages the lifecycle of the network. +kubebuilder:validation:Enum=AnthosManaged;UserManaged
const ( // AnthosManagedLifecycle indicates that the Anthos will manage the Network // lifecycle. AnthosManagedLifecycle LifecycleType = "AnthosManaged" // UserManaged indicates that the user will manage the Network // Lifeycle and Anthos will not create or delete the network. UserManagedLifecycle LifecycleType = "UserManaged" )
type Network ¶
type Network struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NetworkSpec `json:"spec,omitempty"` Status NetworkStatus `json:"status,omitempty"` }
Network represent a logical network on the K8s Cluster. This logical network depends on the host networking setup on cluster nodes.
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Network) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Network) InterfaceName ¶
InterfaceName returns the expected host interface for this Network If vlanID is specified, the expected tagged interface Name is returned otherwise the user specified interfaceName is returned
type NetworkInterface ¶
type NetworkInterface struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NetworkInterfaceSpec `json:"spec,omitempty"` Status NetworkInterfaceStatus `json:"status,omitempty"` }
NetworkInterface defines the network interface for a pod to connect to a network.
func (*NetworkInterface) DeepCopy ¶
func (in *NetworkInterface) DeepCopy() *NetworkInterface
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterface.
func (*NetworkInterface) DeepCopyInto ¶
func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkInterface) DeepCopyObject ¶
func (in *NetworkInterface) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkInterfaceList ¶
type NetworkInterfaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is a slice of NetworkInterface resources. Items []NetworkInterface `json:"items"` }
NetworkInterfaceList contains a list of NetworkInterface resources.
func (*NetworkInterfaceList) DeepCopy ¶
func (in *NetworkInterfaceList) DeepCopy() *NetworkInterfaceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterfaceList.
func (*NetworkInterfaceList) DeepCopyInto ¶
func (in *NetworkInterfaceList) DeepCopyInto(out *NetworkInterfaceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkInterfaceList) DeepCopyObject ¶
func (in *NetworkInterfaceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkInterfaceSpec ¶
type NetworkInterfaceSpec struct { // NetworkName refers to a network object that this NetworkInterface is connected. // +required // +kubebuilder:validation:MinLength=1 NetworkName string `json:"networkName"` // IpAddresses specifies the static IP addresses on this NetworkInterface. // Each IPAddress may contain subnet mask. If subnet mask is not included, /32 is taken as default. // For example, IPAddress input 1.2.3.4 will be taken as 1.2.3.4/32. Alternatively, the input can be 1.2.3.4/24 // with subnet mask of /24. // +optional IpAddresses []string `json:"ipAddresses,omitempty"` // Macddress specifies the static MAC address on this NetworkInterface. // +optional MacAddress *string `json:"macAddress,omitempty"` }
NetworkInterfaceSpec is the specification for the NetworkInterface resource.
func (*NetworkInterfaceSpec) DeepCopy ¶
func (in *NetworkInterfaceSpec) DeepCopy() *NetworkInterfaceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterfaceSpec.
func (*NetworkInterfaceSpec) DeepCopyInto ¶
func (in *NetworkInterfaceSpec) DeepCopyInto(out *NetworkInterfaceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkInterfaceStatus ¶
type NetworkInterfaceStatus struct { // IpAddresses are the IP addresses assigned to the NetworkInterface. IpAddresses []string `json:"ipAddresses,omitempty"` // MacAddress is the MAC address assigned to the NetworkInterface. MacAddress string `json:"macAddress,omitempty"` // Routes contains a list of routes for the network this interface connects to. Routes []Route `json:"routes,omitempty"` // Gateway4 defines the gateway IPv4 address for the network this interface connects to. Gateway4 *string `json:"gateway4,omitempty"` // Specifies the DNS configuration of the network this interface connects to. // +optional DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` // PodName specifies the current pod name this interface is connected to // +optional PodName *string `json:"podName,omitempty"` }
NetworkInterfaceStatus is the status for the NetworkInterface resource.
func (*NetworkInterfaceStatus) DeepCopy ¶
func (in *NetworkInterfaceStatus) DeepCopy() *NetworkInterfaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterfaceStatus.
func (*NetworkInterfaceStatus) DeepCopyInto ¶
func (in *NetworkInterfaceStatus) DeepCopyInto(out *NetworkInterfaceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkList ¶
type NetworkList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is a slice of Network resources. Items []Network `json:"items"` }
NetworkList contains a list of Network resources.
func (*NetworkList) DeepCopy ¶
func (in *NetworkList) DeepCopy() *NetworkList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList.
func (*NetworkList) DeepCopyInto ¶
func (in *NetworkList) DeepCopyInto(out *NetworkList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkList) DeepCopyObject ¶
func (in *NetworkList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkRanges ¶
type NetworkRanges struct { // +kubebuilder:validation:MinItems:=1 CIDRBlocks []string `json:"cidrBlocks"` }
NetworkRanges represents ranges of network addresses.
func (*NetworkRanges) DeepCopy ¶
func (in *NetworkRanges) DeepCopy() *NetworkRanges
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRanges.
func (*NetworkRanges) DeepCopyInto ¶
func (in *NetworkRanges) DeepCopyInto(out *NetworkRanges)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkSpec ¶
type NetworkSpec struct { // Type defines type of network. // Valid options include: L2, L3, Device. // L2 network type enables L2 connectivity on the network. // L3 network type enables L3 connectivity on the network. // Device network type enables direct device access on the network. // +required Type NetworkType `json:"type"` // NodeInterfaceMatcher defines the matcher to discover the corresponding node interface associated with the network. // This field is required for L2 network. // +optional NodeInterfaceMatcher NodeInterfaceMatcher `json:"nodeInterfaceMatcher,omitempty"` // L2NetworkConfig includes all the network config related to L2 type network // +optional L2NetworkConfig *L2NetworkConfig `json:"l2NetworkConfig,omitempty"` // NetworkLifecycle specifies who manages the lifecycle of the network. // This field can only be used when L2NetworkConfig.VlanID is specified. Otherwise the value will be ignored. If // L2NetworkConfig.VlanID is specified and this field is empty, the value is assumed to be AnthosManaged. // +optional NetworkLifecycle *LifecycleType `json:"networkLifecycle,omitempty"` // Routes contains a list of routes for the network. // +optional Routes []Route `json:"routes,omitempty"` // Gateway4 defines the gateway IPv4 address for the network. // Required if ExternalDHCP4 is false or not set on L2 type network. // +optional Gateway4 *string `json:"gateway4,omitempty"` // Specifies the DNS configuration of the network. // Required if ExternalDHCP4 is false or not set on L2 type network. // +optional DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` // ExternalDHCP4 indicates whether the IPAM is static or allocation by the external DHCP server // +optional ExternalDHCP4 *bool `json:"externalDHCP4,omitempty"` }
NetworkSpec contains the specifications for network object
func (*NetworkSpec) DeepCopy ¶
func (in *NetworkSpec) DeepCopy() *NetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.
func (*NetworkSpec) DeepCopyInto ¶
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkStatus ¶
type NetworkStatus struct{}
NetworkStatus contains the status information related to the network.
func (*NetworkStatus) DeepCopy ¶
func (in *NetworkStatus) DeepCopy() *NetworkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus.
func (*NetworkStatus) DeepCopyInto ¶
func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkType ¶
type NetworkType string
NetworkType is the type of network. +kubebuilder:validation:Enum=L2;L3;Device
const ( // L2NetworkType enables L2 connectivity on the network. L2NetworkType NetworkType = "L2" // L3NetworkType enables L3 connectivity on the network. L3NetworkType NetworkType = "L3" // DeviceNetworkType enables direct device access on the network. DeviceNetworkType NetworkType = "Device" )
type NodeInterfaceMatcher ¶
type NodeInterfaceMatcher struct { // InterfaceName specifies the interface name to search on the node. // +kubebuilder:validation:MinLength=1 // +optional InterfaceName *string `json:"interfaceName,omitempty"` }
NodeInterfaceMatcher defines criteria to find the matching interface on host networking.
func (*NodeInterfaceMatcher) DeepCopy ¶
func (in *NodeInterfaceMatcher) DeepCopy() *NodeInterfaceMatcher
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInterfaceMatcher.
func (*NodeInterfaceMatcher) DeepCopyInto ¶
func (in *NodeInterfaceMatcher) DeepCopyInto(out *NodeInterfaceMatcher)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeNetworkAnnotation ¶
type NodeNetworkAnnotation []NodeNetworkStatus
NodeNetworkAnnotation is the value of the network status annotation. +kubebuilder:object:generate:=false
func ParseNodeNetworkAnnotation ¶
func ParseNodeNetworkAnnotation(annotation string) (NodeNetworkAnnotation, error)
ParseNodeNetworkAnnotation parses the given annotation to NodeNetworkAnnotation.
type NodeNetworkStatus ¶
type NodeNetworkStatus struct { // Name specifies the name of the network. Name string `json:"name,omitempty"` }
NodeNetworkStatus specifies the status of a network. +kubebuilder:object:generate:=false
type Route ¶
type Route struct { // To defines a destination IPv4 block in CIDR annotation. e.g. 192.168.0.0/24. // The CIDR 0.0.0.0/0 will be rejected. // +required To string `json:"to"` }
Route defines a routing table entry to a specific subnetwork.
func (*Route) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (*Route) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecondaryRanges ¶
type SecondaryRanges struct { // +kubebuilder:validation:MinItems:=1 RangeNames []string `json:"rangeNames"` }
SecondaryRanges represents ranges of network addresses.
func (*SecondaryRanges) DeepCopy ¶
func (in *SecondaryRanges) DeepCopy() *SecondaryRanges
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecondaryRanges.
func (*SecondaryRanges) DeepCopyInto ¶
func (in *SecondaryRanges) DeepCopyInto(out *SecondaryRanges)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.