Documentation
¶
Index ¶
- Variables
- func CheapestInstanceType(instanceTypes []*cloudprovider.InstanceType) (*cloudprovider.InstanceType, error)
- func DedupeTags(tags []string) []string
- func FilterInstanceTypes(ctx context.Context, instanceTypes []*cloudprovider.InstanceType, ...) ([]*cloudprovider.InstanceType, error)
- func GetInstanceTagsForLKE(nodeClaimName string) map[string]string
- func GetNodeClassHash(nodeClass *v1alpha1.LinodeNodeClass) string
- func GetTags(nodeClass *v1alpha1.LinodeNodeClass, nodeClaim *karpv1.NodeClaim, ...) map[string]string
- func GetTagsForLKE(nodeClass *v1alpha1.LinodeNodeClass, nodeClaim *karpv1.NodeClaim, ...) map[string]string
- func IsRetryableError(err error) bool
- func LookupInstanceByTag(ctx context.Context, client sdk.LinodeAPI, tag string) (*linodego.Instance, error)
- func MapToTagList(m map[string]string) []string
- func ParseInstanceID(providerID string) (string, error)
- func PrettySlice[T any](s []T, maxItems int) string
- func TagListToMap(tags []string) map[string]string
- func UpdateUnavailableOfferingsCache(ctx context.Context, err error, region string, ...)
- func WithDefaultFloat64(key string, def float64) float64
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInstanceNotFound = errors.New("instance not found")
)
Functions ¶
func CheapestInstanceType ¶
func CheapestInstanceType(instanceTypes []*cloudprovider.InstanceType) (*cloudprovider.InstanceType, error)
CheapestInstanceType returns the lowest-price instance type from the set.
func DedupeTags ¶
func FilterInstanceTypes ¶
func FilterInstanceTypes(ctx context.Context, instanceTypes []*cloudprovider.InstanceType, nodeClaim *karpv1.NodeClaim) ([]*cloudprovider.InstanceType, error)
FilterInstanceTypes applies common filters to available instance types.
func GetInstanceTagsForLKE ¶
func GetNodeClassHash ¶
func GetNodeClassHash(nodeClass *v1alpha1.LinodeNodeClass) string
func GetTagsForLKE ¶
func IsRetryableError ¶
func LookupInstanceByTag ¶
func LookupInstanceByTag(ctx context.Context, client sdk.LinodeAPI, tag string) (*linodego.Instance, error)
LookupInstanceByTag returns the single Linode instance matching the provided tag.
func MapToTagList ¶
func ParseInstanceID ¶
ParseInstanceID parses the provider ID stored on the node to get the instance ID associated with a node
func PrettySlice ¶
PrettySlice truncates a slice after a certain number of max items to ensure that the Slice isn't too long
func TagListToMap ¶
func UpdateUnavailableOfferingsCache ¶
func UpdateUnavailableOfferingsCache( ctx context.Context, err error, region string, instanceType *cloudprovider.InstanceType, unavailableOfferings *linodecache.UnavailableOfferings, )
func WithDefaultFloat64 ¶
WithDefaultFloat64 returns the float64 value of the supplied environment variable or, if not present, the supplied default value. If the float64 conversion fails, returns the default
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.