zones

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZonesController

type ZonesController struct {
	MetalService *metal.MetalService
}

func New

func New() *ZonesController

New returns a new zones controller that satisfies the kubernetes cloud provider zones interface

func (ZonesController) GetZone

GetZone returns the Zone containing the current failure zone and locality region that the program is running in. In most cases, this method is called from the kubelet querying a local metadata service to acquire its zone. For the case of external cloud providers, use GetZoneByProviderID or GetZoneByNodeName since GetZone can no longer be called from the kubelets.

func (ZonesController) GetZoneByNodeName

func (z ZonesController) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)

GetZoneByNodeName returns the Zone containing the current zone and locality region of the node specified by node name. This method is particularly used in the context of external cloud providers where node initialization must be done outside the kubelets.

func (ZonesController) GetZoneByProviderID

func (z ZonesController) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)

GetZoneByProviderID returns the Zone containing the current zone and locality region of the node specified by providerID. This method is particularly used in the context of external cloud providers where node initialization must be done outside the kubelets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL