Documentation ¶
Index ¶
- func NewNodeProvider(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, name 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (np *IMDSNodeProvider) 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 (*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.