Documentation ¶
Index ¶
- func NewNodeProvider(ctx context.Context, useMetadata bool, cloudConfigFilePath string) nodemanager.NodeProvider
- type ARMNodeProvider
- func (np *ARMNodeProvider) GetPlatformSubFaultDomain() (string, error)
- func (np *ARMNodeProvider) GetZone(ctx context.Context, name types.NodeName) (cloudprovider.Zone, error)
- func (np *ARMNodeProvider) InstanceID(ctx context.Context, name types.NodeName) (string, error)
- func (np *ARMNodeProvider) InstanceType(ctx context.Context, name types.NodeName) (string, error)
- func (np *ARMNodeProvider) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
- type IMDSNodeProvider
- func (np *IMDSNodeProvider) GetPlatformSubFaultDomain() (string, error)
- func (np *IMDSNodeProvider) GetZone(ctx context.Context, _ types.NodeName) (cloudprovider.Zone, error)
- func (np *IMDSNodeProvider) InstanceID(ctx context.Context, name types.NodeName) (string, error)
- func (np *IMDSNodeProvider) InstanceType(ctx context.Context, name types.NodeName) (string, error)
- func (np *IMDSNodeProvider) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNodeProvider ¶ added in v0.7.3
func NewNodeProvider(ctx context.Context, 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(ctx context.Context, cloudConfigFilePath string) *ARMNodeProvider
NewARMNodeProvider creates a new ARMNodeProvider.
func (*ARMNodeProvider) GetPlatformSubFaultDomain ¶ added in v0.7.13
func (np *ARMNodeProvider) GetPlatformSubFaultDomain() (string, error)
GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
func (*ARMNodeProvider) GetZone ¶ added in v0.7.3
func (np *ARMNodeProvider) GetZone(ctx context.Context, name types.NodeName) (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. 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
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
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(ctx context.Context) *IMDSNodeProvider
NewIMDSNodeProvider creates a new IMDSNodeProvider.
func (*IMDSNodeProvider) GetPlatformSubFaultDomain ¶ added in v0.7.13
func (np *IMDSNodeProvider) GetPlatformSubFaultDomain() (string, error)
GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
func (*IMDSNodeProvider) GetZone ¶
func (np *IMDSNodeProvider) GetZone(ctx context.Context, _ types.NodeName) (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. If the node is not running with availability zones, then it will fall back to fault domain.
func (*IMDSNodeProvider) InstanceID ¶
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 ¶
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.