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 v1 is the v1 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 DefaultNetworkIfEmpty(s string) string
- func IsDefaultNetwork(networkName string) bool
- func MarshalAnnotation(a interface{}) (string, error)
- func MarshalNICInfoAnnotation(a NICInfoAnnotation) (string, error)
- func MarshalNodeNetworkAnnotation(a NodeNetworkAnnotation) (string, error)
- func MarshalNorthInterfacesAnnotation(a NorthInterfacesAnnotation) (string, error)
- func Resource(resource string) schema.GroupResource
- type DNSConfig
- type DeviceModeType
- type GKENetworkParamSet
- type GKENetworkParamSetConditionReason
- type GKENetworkParamSetConditionType
- type GKENetworkParamSetList
- type GKENetworkParamSetSpec
- type GKENetworkParamSetStatus
- type GNPNetworkParamsReadyConditionReason
- type IPAMModeType
- type InterfaceAnnotation
- type InterfaceRef
- type L2NetworkConfig
- type LifecycleType
- type MultiNetworkAnnotation
- type NICInfoAnnotation
- type NICInfoRef
- type Network
- type NetworkConditionType
- type NetworkInterface
- type NetworkInterfaceList
- type NetworkInterfaceSpec
- type NetworkInterfaceStatus
- type NetworkList
- type NetworkParametersReference
- type NetworkRanges
- type NetworkReadyConditionReason
- type NetworkSpec
- type NetworkStatus
- type NetworkType
- type NodeInterfaceMatcher
- type NodeNetwork
- type NodeNetworkAnnotation
- type NodeNetworkStatus
- type NorthInterface
- type NorthInterfacesAnnotation
- type PodIP
- type PodIPsAnnotation
- type ProviderType
- 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" // DisableSourceMACValidationAnnotationKey is the annotation on pod to disable source MAC validation on L2 interfaces. DisableSourceMACValidationAnnotationKey = "networking.gke.io/disable-source-mac-validation" // DisableSourceMACValidationAnnotationValTrue is the value to disable source MAC validation for the pod. DisableSourceMACValidationAnnotationValTrue = "true" // EnableMulticastAnnotationKey is the annotation on pod to enable multicast on L2 interfaces. // It's also used to enable IGMP protocol for L2 interfaces. EnableMulticastAnnotationKey = "networking.gke.io/enable-multicast" // EnableMulticastAnnotationValTrue is the value to enable multicast for the pod. EnableMulticastAnnotationValTrue = "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" // PodIPsAnnotationKey is the key of the annotation which indicates additional pod IPs assigned to the pod. PodIPsAnnotationKey = "networking.gke.io/pod-ips" // 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" // MultiNetworkAnnotationKey is the network annotation key used to hold network data per node, eg: PodCIDRs. MultiNetworkAnnotationKey = "networking.gke.io/networks" // AutoGenAnnotationKey is to indicate if the object is auto-generated. AutoGenAnnotationKey = "networking.gke.io/auto-generated" // AutoGenAnnotationValTrue is the value to be set for auto-generated objects. AutoGenAnnotationValTrue = "true" // NorthInterfacesAnnotationKey is the annotation key used to hold interfaces data per node. NorthInterfacesAnnotationKey = "networking.gke.io/north-interfaces" // NICInfoAnnotationKey specifies the mapping between the fist IP addresse and the PCI BDF number on the node. NICInfoAnnotationKey = "networking.gke.io/nic-info" )
Annotation definitions.
const ( // DefaultNetworkName is the network used by the VETH interface. DefaultNetworkName = "pod-network" // DefaultPodNetworkName is the network used by the VETH interface. // This is same as DefaultNetworkName except for a different name. DefaultNetworkName will be eventually deprecated. DefaultPodNetworkName = "default" // NetworkResourceKeyPrefix is the prefix for extended resource // name corresponding to the network. // e.g. "networking.gke.io.networks/my-network.IP" NetworkResourceKeyPrefix = "networking.gke.io.networks/" )
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: "v1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func DefaultNetworkIfEmpty ¶
DefaultNetworkIfEmpty takes a string corresponding to a network name and makes sure that if it is empty then it is set to the default network. This comes from the idea that a network is like a namespace, where an empty network is the same as the default. Use before comparisons of networks.
func IsDefaultNetwork ¶
IsDefaultNetwork takes a network name and returns if it is a default network. Both DefaultNetworkName and DefaultPodNetworkName are considered as default network for compatibility purposes. DefaultNetworkName will eventually be removed.
func MarshalAnnotation ¶
MarshalAnnotation marshals any object into string using json.Marshal.
func MarshalNICInfoAnnotation ¶
func MarshalNICInfoAnnotation(a NICInfoAnnotation) (string, error)
MarshalNICInfoAnnotation marshals a NICInfoAnnotation into string.
func MarshalNodeNetworkAnnotation ¶
func MarshalNodeNetworkAnnotation(a NodeNetworkAnnotation) (string, error)
MarshalNodeNetworkAnnotation marshals a NodeNetworkAnnotation into string.
func MarshalNorthInterfacesAnnotation ¶
func MarshalNorthInterfacesAnnotation(a NorthInterfacesAnnotation) (string, error)
MarshalNorthInterfacesAnnotation marshals a NorthInterfacesAnnotation 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;RDMA
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" // RDMA indicates that NICs support RDMA RDMA DeviceModeType = "RDMA" )
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 GKENetworkParamSetConditionReason ¶
type GKENetworkParamSetConditionReason string
GKENetworkParamSetConditionReason defines the set of reasons that explain why a particular GKENetworkParamSet condition type has been raised.
const ( // VPCNotFound indicates that the specified VPC was not found. VPCNotFound GKENetworkParamSetConditionReason = "VPCNotFound" // SubnetNotFound indicates that the specified subnet was not found. SubnetNotFound GKENetworkParamSetConditionReason = "SubnetNotFound" // SecondaryRangeAndDeviceModeUnspecified indicates that the user didn't specify either a device mode or secondary range SecondaryRangeAndDeviceModeUnspecified GKENetworkParamSetConditionReason = "SecondaryRangeAndDeviceModeUnspecified" // SecondaryRangeNotFound indicates that the specified secondary range was not found. SecondaryRangeNotFound GKENetworkParamSetConditionReason = "SecondaryRangeNotFound" // DeviceModeCantBeUsedWithSecondaryRange indicates that device mode was used with a secondary range. DeviceModeCantBeUsedWithSecondaryRange GKENetworkParamSetConditionReason = "DeviceModeCantBeUsedWithSecondaryRange" // DeviceModeVPCAlreadyInUse indicates that the VPC is already in use by another GKENetworkParamSet resource. DeviceModeVPCAlreadyInUse GKENetworkParamSetConditionReason = "DeviceModeVPCAlreadyInUse" // DeviceModeSubnetAlreadyInUse indicates that the Subnet is already in use by another GKENetworkParamSet resource. DeviceModeSubnetAlreadyInUse GKENetworkParamSetConditionReason = "DeviceModeSubnetAlreadyInUse" // DeviceModeCantUseDefaultVPC indicates that a device mode GKENetworkParamSet cannot use the default VPC. DeviceModeCantUseDefaultVPC GKENetworkParamSetConditionReason = "DeviceModeCantUseDefaultVPC" // DPDKUnsupported indicates that DPDK device mode is not supported on the current cluster. DPDKUnsupported GKENetworkParamSetConditionReason = "DPDKUnsupported" // GNPReady indicates that this GNP resource has been successfully validated and Ready=True GNPReady GKENetworkParamSetConditionReason = "GNPReady" )
type GKENetworkParamSetConditionType ¶
type GKENetworkParamSetConditionType string
GKENetworkParamSetConditionType is the type for status conditions on a GKENetworkParamSet. This type should be used with the GKENetworkParamSetStatus.Conditions field.
const ( // GKENetworkParamSetStatusReady is the condition type that holds // if the GKENetworkParamSet object is validated GKENetworkParamSetStatusReady GKENetworkParamSetConditionType = "Ready" )
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 specifies the VPC to which the network belongs. Mutually exclusive with NetworkAttachment. // This field is required when not connecting across a network attachment // +optional VPC string `json:"vpc,omitempty"` // VPCSubnet is the path of the VPC subnet. Must be set if specifying VPC. Mutually exclusive with // NetworkAttachment. This field is required when not connecting across a network attachment // +optional VPCSubnet string `json:"vpcSubnet,omitempty"` // 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. Mutually exclusive with // NetworkAttachment // +optional DeviceMode DeviceModeType `json:"deviceMode,omitempty"` // 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. Mutually exclusive with // NetworkAttachment // +optional PodIPv4Ranges *SecondaryRanges `json:"podIPv4Ranges,omitempty"` // NetworkAttachment specifies the network attachment to connect to. Mutually exclusive with VPC, // VPCSubnet, DeviceMode, and PodIPv4Ranges // +optional NetworkAttachment string `json:"networkAttachment,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 GNPNetworkParamsReadyConditionReason ¶
type GNPNetworkParamsReadyConditionReason string
GNPNetworkParamsReadyConditionReason defines the set of reasons that explains the ParamsReady condition on the referencing Network resource.
const ( // L3SecondaryMissing indicates that the L3 type Network resource is // referencing a GKENetworkParamSet with secondary range unspecified. L3SecondaryMissing GNPNetworkParamsReadyConditionReason = "L3SecondaryMissing" // DeviceModeMissing indicates that the Device type Network resource is // referencing a GKENetworkParamSet with device mode unspecified. DeviceModeMissing GNPNetworkParamsReadyConditionReason = "DeviceModeMissing" // GNPDeleted indicates that the referenced GNP resource was deleted GNPDeleted GNPNetworkParamsReadyConditionReason = "GNPDeleted" // GNPParamsReady indicates that the referenced GNP resource // has been successfully validated for use with this Network resource and ParamsReady=True GNPParamsReady GNPNetworkParamsReadyConditionReason = "GNPParamsReady" // GNPParamsNotReady indicates that the referenced GNP resource // needs to be updated and triggers Network resource to update GNPParamsNotReady GNPNetworkParamsReadyConditionReason = "GNPParamsNotReady" )
type IPAMModeType ¶
type IPAMModeType string
IPAMModeType defines the IPAM mode for the network. Can be 'internal' or 'external'. +kubebuilder:validation:Enum=Internal;External
const ( // Pod IPs will be allocated internally by ipam-controller based on ClusterCIDRConfig. InternalMode IPAMModeType = "Internal" // Pod IPs will be allocated by the external DHCP server. ExternalMode IPAMModeType = "External" )
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"` // PrefixLength4 denotes the IPv4 prefix length of the range // corresponding to the network. It is used to assign IPs to the pods for // multi-networking. This field is required when IPAM is handled internally and dynamically // via CCC. It's disallowed for other cases. For static IP, the prefix length is set as // part of the address in NetworkInterface object. // +optional // +kubebuilder:validation:Maximum=32 // +kubebuilder:validation:Minimum=1 PrefixLength4 *int32 `json:"prefixLength4,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 MultiNetworkAnnotation ¶
type MultiNetworkAnnotation []NodeNetwork
MultiNetworkAnnotation is the value of networks annotation. +kubebuilder:object:generate:=false
func ParseMultiNetworkAnnotation ¶
func ParseMultiNetworkAnnotation(annotation string) (MultiNetworkAnnotation, error)
ParseMultiNetworkAnnotation parses given annotation to MultiNetworkAnnotation.
type NICInfoAnnotation ¶
type NICInfoAnnotation []NICInfoRef
NICInfoAnnotation is the value of the nic-info annotation +kubebuilder:object:generate:=false
func ParseNICInfoAnnotation ¶
func ParseNICInfoAnnotation(annotation string) (NICInfoAnnotation, error)
ParseNICInfoAnnotation parses given annotation to NicInfoAnnotation
type NICInfoRef ¶
type NICInfoRef struct { // First IP address of the interface. BirthIP string `json:"birthIP,omitempty"` // PCI address of this device on the node. PCIAddress string `json:"pciAddress,omitempty"` // Name is the birth name of this interface at node boot time. BirthName string `json:"birthName,omitempty"` }
NICInfoRef specifies the mapping between a NIC's first IP and its PCI address on the node. +kubebuilder:object:generate:=false
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.
type NetworkConditionType ¶
type NetworkConditionType string
NetworkConditionType is the type for status conditions on a Network. This type should be used with the NetworkStatus.Conditions field.
const ( // NetworkConditionStatusReady is the condition type that holds // if the Network object is validated NetworkConditionStatusReady NetworkConditionType = "Ready" // NetworkConditionStatusParamsReady is the condition type that holds // if the params object referenced by Network is validated NetworkConditionStatusParamsReady NetworkConditionType = "ParamsReady" )
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 NetworkParametersReference ¶
type NetworkParametersReference struct { // Group is the API group of k8s resource, e.g. "networking.k8s.io". Group string `json:"group"` // Kind is kind of the referent, e.g. "networkpolicy". Kind string `json:"kind"` // Name is the name of the resource object. Name string `json:"name"` // Namespace is the namespace of the referent. This field is required when referring to a // Namespace-scoped resource and MUST be unset when referring to a Cluster-scoped resource. // +optional Namespace *string `json:"namespace,omitempty"` }
NetworkParametersReference identifies an API object containing additional parameters for the network.
func (*NetworkParametersReference) DeepCopy ¶
func (in *NetworkParametersReference) DeepCopy() *NetworkParametersReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkParametersReference.
func (*NetworkParametersReference) DeepCopyInto ¶
func (in *NetworkParametersReference) DeepCopyInto(out *NetworkParametersReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 NetworkReadyConditionReason ¶
type NetworkReadyConditionReason string
NetworkReadyConditionReason defines the set of reasons that explain why a particular Network Ready condition type has been raised.
const ( // ParamsNotReady indicates that the resource referenced in params is not ready. ParamsNotReady NetworkReadyConditionReason = "ParamsNotReady" // NetworkReady indicates that this Network resource is validated and Ready=True NetworkReady NetworkReadyConditionReason = "NetworkReady" )
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"` // Provider specifies the provider implementing this network, e.g. "GKE". Provider *ProviderType `json:"provider,omitempty"` // 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"` // ParametersRef is a reference to a resource that contains vendor or implementation specific // configurations for the network. // +optional ParametersRef *NetworkParametersReference `json:"parametersRef,omitempty"` // IPAMMode specifies the IPAM mode for the network. // Valid options include: internal, external // +optional IPAMMode *IPAMModeType `json:"IPAMMode,omitempty"` // IPAMMode6 specifies the IPAM mode for the IPv6 network. // Valid options include: internal, external // +optional IPAMMode6 *IPAMModeType `json:"IPAMMode6,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 { // Conditions is a field representing the current conditions of the Network. // // Known condition types are: // // * "Ready" // * "ParamsReady" // // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
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 NodeNetwork ¶
type NodeNetwork struct { // Name specifies the name of the network. Name string `json:"name"` // Cidrs denotes the IPv4/IPv6 ranges of the network. Cidrs []string `json:"cidrs"` // Scope specifies if the network is local to a node or global across a node pool. Scope string `json:"scope"` }
NodeNetwork specifies network data on a node. +kubebuilder:object:generate:=false
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"` // IPv4Subnet is the Node internal IPv4 subnet for the network. IPv4Subnet string `json:"ipv4-subnet,omitempty"` // IPv6Subnet is the Node internal IPv6 subnet for the network. IPv6Subnet string `json:"ipv6-subnet,omitempty"` }
NodeNetworkStatus specifies the status of a network. +kubebuilder:object:generate:=false
type NorthInterface ¶
type NorthInterface struct { // Name of the network an interface on node is connected to. Network string `json:"network"` // IP address of the interface. IpAddress string `json:"ipAddress"` }
NorthInterface specifies interface data on a node. +kubebuilder:object:generate:=false
type NorthInterfacesAnnotation ¶
type NorthInterfacesAnnotation []NorthInterface
NorthInterfacesAnnotation is the value of north-interfaces annotation. +kubebuilder:object:generate:=false
func ParseNorthInterfacesAnnotation ¶
func ParseNorthInterfacesAnnotation(annotation string) (NorthInterfacesAnnotation, error)
ParseNorthInterfacesAnnotation parses given annotation to NorthInterfacesAnnotation.
type PodIP ¶
type PodIP struct { // NetworkName refers to the network object associated with this IP. NetworkName string `json:"networkName"` // IP is an IP address (IPv4 or IPv6) assigned to the pod. IP string `json:"ip"` }
PodIP specifies the additional pod IPs assigned to the pod. This will eventually be merged into the `podIPs` field in PodStatus, so the fields must remain compatible. +kubebuilder:object:generate:=false
type PodIPsAnnotation ¶
type PodIPsAnnotation []PodIP
PodIPsAnnotation is the value of the pod IPs annotation. +kubebuilder:object:generate:=false
func ParsePodIPsAnnotation ¶
func ParsePodIPsAnnotation(annotation string) (PodIPsAnnotation, error)
ParsePodIPsAnnotation parses the given annotation to PodIPsAnnotation.
type ProviderType ¶
type ProviderType string
ProviderType defines provider of the network. +kubebuilder:validation:Enum=GKE
const ( // GKE indicates network provider is "GKE" GKE ProviderType = "GKE" )
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.