Documentation
¶
Index ¶
- Variables
- func AsMap(key string, target *map[string]string) configmap.ParseFunc
- func AsTypedString[T ~string](key string, target *T) configmap.ParseFunc
- func FromMap(data map[string]string) func(key string, target *map[string]string) error
- func ToContext(ctx context.Context, s Settings) context.Context
- type NodeNameConvention
- type Settings
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextKey = Registration
View Source
var Registration = &config.Registration{ ConfigMapName: "karpenter-global-settings", Constructor: NewSettingsFromConfigMap, }
Functions ¶
func AsMap ¶
AsMap parses any value with the prefix key into a map with suffixes as keys and values as values in the target map. e.g. {"aws.tags.tag1":"value1"} gets parsed into the map Tags as {"tag1": "value1"}
func AsTypedString ¶
AsTypedString passes the value at key through into the target, if it exists.
Types ¶
type NodeNameConvention ¶
type NodeNameConvention string
const ( IPName NodeNameConvention = "ip-name" ResourceName NodeNameConvention = "resource-name" )
type Settings ¶
type Settings struct {
ClusterName string `json:"aws.clusterName" validate:"required"`
ClusterEndpoint string `json:"aws.clusterEndpoint" validate:"required"`
DefaultInstanceProfile string `json:"aws.defaultInstanceProfile"`
EnablePodENI bool `json:"aws.enablePodENI,string"`
EnableENILimitedPodDensity bool `json:"aws.enableENILimitedPodDensity,string"`
IsolatedVPC bool `json:"aws.isolatedVPC,string"`
NodeNameConvention NodeNameConvention `json:"aws.nodeNameConvention" validate:"required"`
VMMemoryOverheadPercent float64 `json:"aws.vmMemoryOverheadPercent,string" validate:"min=0"`
InterruptionQueueName string `json:"aws.interruptionQueueName,string"`
Tags map[string]string `json:"aws.tags,omitempty"`
}
func FromContext ¶
func NewSettingsFromConfigMap ¶
NewSettingsFromConfigMap creates a Settings from the supplied ConfigMap
Click to show internal directories.
Click to hide internal directories.