utils

package
v1.7.3-hash-fix-backport Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EC2MergeTags added in v1.4.0

func EC2MergeTags(tags ...map[string]string) []ec2types.Tag

EC2MergeTags takes a variadic list of maps and merges them together into a list of EC2 tags to be passed into EC2 API calls

func GetNodeClassHash added in v0.37.8

func GetNodeClassHash(nodeClass *v1.EC2NodeClass) string

func GetTags added in v1.3.0

func GetTags(nodeClass *v1.EC2NodeClass, nodeClaim *karpv1.NodeClaim, clusterName string) (map[string]string, error)

func IAMMergeTags added in v1.4.0

func IAMMergeTags(tags ...map[string]string) []iamtypes.Tag

EC2MergeTags takes a variadic list of maps and merges them together into a list of EC2 tags to be passed into EC2 API calls

func ParseInstanceID

func ParseInstanceID(providerID string) (string, error)

ParseInstanceID parses the provider ID stored on the node to get the instance ID associated with a node

func PrettySlice

func PrettySlice[T any](s []T, maxItems int) string

PrettySlice truncates a slice after a certain number of max items to ensure that the Slice isn't too long

func WithDefaultFloat64 added in v1.0.0

func WithDefaultFloat64(key string, def float64) float64

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL