helper

package
v1.93.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterAutoscalerRequired

func ClusterAutoscalerRequired(pools []extensionsv1alpha1.WorkerPool) bool

ClusterAutoscalerRequired returns whether the given worker pool configuration indicates that a cluster-autoscaler is needed.

func Decode added in v1.35.0

func Decode(codecIDString string, data []byte) ([]byte, error)

Decode decodes the given data using the codec from resolving the given codecIDString. It's a shorthand for parsing the FileCodecID and calling the `Decode` method on the obtained FileCodec.

func DeterminePrimaryIPFamily added in v1.63.0

func DeterminePrimaryIPFamily(ipFamilies []extensionsv1alpha1.IPFamily) extensionsv1alpha1.IPFamily

DeterminePrimaryIPFamily determines the primary IP family out of a specified list of IP families.

func FilePathsFrom added in v1.85.0

func FilePathsFrom(files []extensionsv1alpha1.File) []string

FilePathsFrom returns the paths for all the given files.

func GetDNSRecordTTL added in v1.27.0

func GetDNSRecordTTL(ttl *int64) int64

GetDNSRecordTTL returns the value of the given ttl, or 120 if nil.

func GetDNSRecordType added in v1.27.0

func GetDNSRecordType(address string) extensionsv1alpha1.DNSRecordType

GetDNSRecordType returns the appropriate DNS record type (A/AAAA or CNAME) for the given address.

func GetMachineDeploymentClusterAutoscalerAnnotations added in v1.90.0

func GetMachineDeploymentClusterAutoscalerAnnotations(caOptions *extensionsv1alpha1.ClusterAutoscalerOptions) map[string]string

GetMachineDeploymentClusterAutoscalerAnnotations returns a map of annotations with values intended to be used as cluster-autoscaler options for the worker group

func ParseFileCodecID added in v1.35.0

func ParseFileCodecID(s string) (extensionsv1alpha1.FileCodecID, error)

ParseFileCodecID tries to parse a string into a FileCodecID.

Types

type FileCodec added in v1.35.0

type FileCodec interface {
	Encode([]byte) ([]byte, error)
	Decode([]byte) ([]byte, error)
}

FileCodec is a codec to en- and decode data in cloud-init scripts with.j

var (
	// PlainFileCodec is a noop FileCodec.
	PlainFileCodec FileCodec = plainFileCodec{}
	// B64FileCodec is the base64 FileCodec.
	B64FileCodec FileCodec = b64FileCodec{}
)

func FileCodecForID added in v1.35.0

func FileCodecForID(id extensionsv1alpha1.FileCodecID) FileCodec

FileCodecForID retrieves the FileCodec for the given FileCodecID.

Jump to

Keyboard shortcuts

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