Documentation ¶
Overview ¶
Package noderefutil implements NodeRef utils. The ProviderID type is deprecated and unused by Cluster API internally. It will be removed entirely in a future release.
Index ¶
- Variables
- func GetReadyCondition(status *corev1.NodeStatus) *corev1.NodeCondition
- func IsNodeAvailable(node *corev1.Node, minReadySeconds int32, now metav1.Time) bool
- func IsNodeReady(node *corev1.Node) bool
- func IsNodeUnreachable(node *corev1.Node) bool
- type ProviderIDdeprecated
- func (p *ProviderID) CloudProvider() stringdeprecated
- func (p *ProviderID) Equals(o *ProviderID) booldeprecated
- func (p *ProviderID) ID() stringdeprecated
- func (p *ProviderID) IndexKey() stringdeprecated
- func (p ProviderID) String() stringdeprecated
- func (p *ProviderID) Validate() booldeprecated
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyProviderID means that the provider id is empty. // // Deprecated: This var is going to be removed in a future release. ErrEmptyProviderID = errors.New("providerID is empty") // ErrInvalidProviderID means that the provider id has an invalid form. // // Deprecated: This var is going to be removed in a future release. ErrInvalidProviderID = errors.New("providerID must be of the form <cloudProvider>://<optional>/<segments>/<provider id>") )
Functions ¶
func GetReadyCondition ¶
func GetReadyCondition(status *corev1.NodeStatus) *corev1.NodeCondition
GetReadyCondition extracts the ready condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func IsNodeAvailable ¶
IsNodeAvailable returns true if the node is ready and minReadySeconds have elapsed or is 0. False otherwise.
func IsNodeReady ¶
IsNodeReady returns true if a node is ready; false otherwise.
func IsNodeUnreachable ¶ added in v0.3.0
IsNodeUnreachable returns true if a node is unreachable. Node is considered unreachable when its ready status is "Unknown".
Types ¶
type ProviderID
deprecated
type ProviderID struct {
// contains filtered or unexported fields
}
ProviderID is a struct representation of a Kubernetes ProviderID. Format: cloudProvider://optional/segments/etc/id
Deprecated: This struct is going to be removed in a future release.
func NewProviderID
deprecated
func NewProviderID(id string) (*ProviderID, error)
NewProviderID parses the input string and returns a new ProviderID.
Deprecated: This constructor is going to be removed in a future release.
func (*ProviderID) CloudProvider
deprecated
func (p *ProviderID) CloudProvider() string
CloudProvider returns the cloud provider portion of the ProviderID.
Deprecated: This method is going to be removed in a future release.
func (*ProviderID) Equals
deprecated
func (p *ProviderID) Equals(o *ProviderID) bool
Equals returns true if this ProviderID string matches another ProviderID string.
Deprecated: This method is going to be removed in a future release.
func (*ProviderID) ID
deprecated
func (p *ProviderID) ID() string
ID returns the identifier portion of the ProviderID.
Deprecated: This method is going to be removed in a future release.
func (*ProviderID) IndexKey
deprecated
added in
v0.4.1
func (p *ProviderID) IndexKey() string
IndexKey returns the required level of uniqueness to represent and index machines uniquely from their node providerID.
Deprecated: This method is going to be removed in a future release.
func (ProviderID) String
deprecated
func (p ProviderID) String() string
String returns the string representation of this object.
Deprecated: This method is going to be removed in a future release.
func (*ProviderID) Validate
deprecated
func (p *ProviderID) Validate() bool
Validate returns true if the provider id is valid.
Deprecated: This method is going to be removed in a future release.