settings

package
v0.31.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = settingsKeyType{}

Functions

func AsStringMap

func AsStringMap(key string, target *map[string]string) configmap.ParseFunc

AsStringMap parses a value as a JSON map of map[string]string.

func AsTypedString

func AsTypedString[T ~string](key string, target *T) configmap.ParseFunc

AsTypedString passes the value at key through into the target, if it exists.

func ToContext

func ToContext(ctx context.Context, s *Settings) context.Context

Types

type Settings

type Settings struct {
	AssumeRoleARN              string
	AssumeRoleDuration         time.Duration
	ClusterCABundle            string
	ClusterName                string
	ClusterEndpoint            string
	DefaultInstanceProfile     string
	EnablePodENI               bool
	EnableENILimitedPodDensity bool
	IsolatedVPC                bool
	VMMemoryOverheadPercent    float64
	InterruptionQueueName      string
	Tags                       map[string]string
	ReservedENIs               int
}

+k8s:deepcopy-gen=true

func FromContext

func FromContext(ctx context.Context) *Settings

func (*Settings) ConfigMap

func (*Settings) ConfigMap() string

func (*Settings) DeepCopy

func (in *Settings) DeepCopy() *Settings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Settings.

func (*Settings) DeepCopyInto

func (in *Settings) DeepCopyInto(out *Settings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Settings) Inject

func (*Settings) Inject(ctx context.Context, cm *v1.ConfigMap) (context.Context, error)

Inject creates a Settings from the supplied ConfigMap

func (Settings) Validate

func (s Settings) Validate() (errs *apis.FieldError)

Jump to

Keyboard shortcuts

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