Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NetworkInfo ¶
type NetworkInfo struct { // IsDefault indicates if the network is the default one. IsDefault bool // K8sNetwork is the network name of the Network resource in the cluster. // This name should be used when referring to k8s API network. K8sNetwork string // NetworkURL is the GCE VPC URL (to be used in GCE LB resources). NetworkURL string // SubnetworkURL is the GCE subnetwork URL (to be used in GCE LB resources). SubnetworkURL string }
NetworkInfo contains the information about the network the LB resources should be created in.
func DefaultNetwork ¶
func DefaultNetwork(cloudProvider cloudNetworkProvider) *NetworkInfo
func ServiceNetwork ¶
func ServiceNetwork(service *apiv1.Service, networkLister, gkeNetworkParamSetLister cache.Indexer, cloudProvider cloudNetworkProvider, logger klog.Logger) (*NetworkInfo, error)
ServiceNetwork determines the network data to be used for the LB resources. This function currently returns only the default network but will provide secondary networks information for multi-networked services in the future.
func (*NetworkInfo) IsNodeConnected ¶
func (ni *NetworkInfo) IsNodeConnected(node *apiv1.Node) bool
IsNodeConnected checks if the node is connected to the given network. All nodes are connected to the default network. For non default networks the result is based on the data from the 'networking.gke.io/north-interfaces' node annotation.
Click to show internal directories.
Click to hide internal directories.