node

package
v0.7.4-premiumv2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeProvider

func NewNodeProvider(useMetadata bool, cloudConfigFilePath string) nodemanager.NodeProvider

NewNodeProvider returns a node provider depending on the use case

Types

type ARMNodeProvider

type ARMNodeProvider struct {
	// contains filtered or unexported fields
}

ARMNodeProvider implements nodemanager.NodeProvider.

func NewARMNodeProvider

func NewARMNodeProvider(cloudConfigFilePath string) *ARMNodeProvider

NewARMNodeProvider creates a new ARMNodeProvider.

func (*ARMNodeProvider) GetPlatformSubFaultDomain

func (np *ARMNodeProvider) GetPlatformSubFaultDomain() (string, error)

GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.

func (*ARMNodeProvider) 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. If the node is not running with availability zones, then it will fall back to fault domain.

func (*ARMNodeProvider) InstanceID

func (np *ARMNodeProvider) InstanceID(ctx context.Context, name types.NodeName) (string, error)

InstanceID returns the cloud provider ID of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)

func (*ARMNodeProvider) InstanceType

func (np *ARMNodeProvider) InstanceType(ctx context.Context, name types.NodeName) (string, error)

InstanceType returns the type of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) (Implementer Note): This is used by kubelet. Kubelet will label the node. Real log from kubelet:

Adding node label from cloud provider: beta.kubernetes.io/instance-type=[value]

func (*ARMNodeProvider) NodeAddresses

func (np *ARMNodeProvider) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)

NodeAddresses returns the addresses of the specified instance.

type IMDSNodeProvider

type IMDSNodeProvider struct {
	// contains filtered or unexported fields
}

IMDSNodeProvider implements nodemanager.NodeProvider.

func NewIMDSNodeProvider

func NewIMDSNodeProvider() *IMDSNodeProvider

NewIMDSNodeProvider creates a new IMDSNodeProvider.

func (*IMDSNodeProvider) GetPlatformSubFaultDomain

func (np *IMDSNodeProvider) GetPlatformSubFaultDomain() (string, error)

GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.

func (*IMDSNodeProvider) 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. If the node is not running with availability zones, then it will fall back to fault domain.

func (*IMDSNodeProvider) InstanceID

func (np *IMDSNodeProvider) InstanceID(ctx context.Context, name types.NodeName) (string, error)

InstanceID returns the cloud provider ID of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)

func (*IMDSNodeProvider) InstanceType

func (np *IMDSNodeProvider) InstanceType(ctx context.Context, name types.NodeName) (string, error)

InstanceType returns the type of the specified instance. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) (Implementer Note): This is used by kubelet. Kubelet will label the node. Real log from kubelet:

Adding node label from cloud provider: beta.kubernetes.io/instance-type=[value]

func (*IMDSNodeProvider) NodeAddresses

func (np *IMDSNodeProvider) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)

NodeAddresses returns the addresses of the specified instance.

Jump to

Keyboard shortcuts

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