node

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeProvider added in v0.7.3

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

NewNodeProvider returns a node provider depending on the use case

Types

type ARMNodeProvider added in v0.7.3

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

ARMNodeProvider implements nodemanager.NodeProvider.

func NewARMNodeProvider added in v0.7.3

func NewARMNodeProvider(cloudConfigFilePath string) *ARMNodeProvider

NewARMNodeProvider creates a new ARMNodeProvider.

func (*ARMNodeProvider) GetZone added in v0.7.3

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 added in v0.7.3

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 added in v0.7.3

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 added in v0.7.3

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) 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