util

package
v0.0.0-...-8342a83 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LeaseDuration is the default duration for the leader election lease.
	LeaseDuration = metav1.Duration{Duration: 137 * time.Second}
	// RenewDeadline is the default duration for the leader renewal.
	RenewDeadline = metav1.Duration{Duration: 107 * time.Second}
	// RetryPeriod is the default duration for the leader election retrial.
	RetryPeriod = metav1.Duration{Duration: 26 * time.Second}
)

The default durations for the leader election operations.

Functions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString checks if a given slice of strings contains the provided string.

func GetPlatform

func GetPlatform(ctx context.Context, cl client.Reader) (configv1.PlatformType, error)

func IsPatchRequired

func IsPatchRequired(origObj client.Object, patch client.Patch) (bool, error)

func ReadImagesFile

func ReadImagesFile(imagesFile string) (map[string]string, error)

ReadImagesFile reads the images file and returns the map of container images

func ReadProvidersFile

func ReadProvidersFile(providersFile string) (map[string]bool, error)

ReadProvidersFile reads the providers file and returns the map of supported providers

Types

This section is empty.

Jump to

Keyboard shortcuts

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