Documentation ¶
Index ¶
- type ZonesController
- func (z ZonesController) GetZone(_ context.Context) (cloudprovider.Zone, error)
- func (z ZonesController) GetZoneByNodeName(_ context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
- func (z ZonesController) GetZoneByProviderID(_ context.Context, providerID string) (cloudprovider.Zone, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZonesController ¶
type ZonesController struct { K8sClient clientset.Interface // contains filtered or unexported fields }
func New ¶
func New(client *metalgo.Driver) *ZonesController
New returns a new zones controller that satisfies the kubernetes cloud provider zones interface
func (ZonesController) GetZone ¶
func (z ZonesController) GetZone(_ context.Context) (cloudprovider.Zone, error)
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(_ 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(_ 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.