helper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineLatestExpirableVersion added in v1.0.0

func DetermineLatestExpirableVersion(offeredVersions []core.ExpirableVersion) (core.ExpirableVersion, error)

DetermineLatestExpirableVersion determines the latest ExpirableVersion from a slice of ExpirableVersions

func DetermineLatestMachineImageVersion added in v1.0.0

func DetermineLatestMachineImageVersion(image core.MachineImage) (core.ExpirableVersion, error)

DetermineLatestMachineImageVersion determines the latest MachineImageVersion from a MachineImage

func DetermineLatestMachineImageVersions added in v1.0.0

func DetermineLatestMachineImageVersions(images []core.MachineImage) (map[string]core.ExpirableVersion, error)

DetermineLatestMachineImageVersions determines the latest versions (semVer) of the given machine images from a slice of machine images

func FilterVersionsWithClassification added in v1.3.0

func FilterVersionsWithClassification(versions []core.ExpirableVersion, classification core.VersionClassification) []core.ExpirableVersion

FilterVersionsWithClassification filters versions for a classification

func FindPrimaryDNSProvider added in v1.1.0

func FindPrimaryDNSProvider(providers []core.DNSProvider) *core.DNSProvider

FindPrimaryDNSProvider finds the primary provider among the given `providers`. It returns the first provider if multiple candidates are found.

func FindVersionsWithSameMajorMinor added in v1.3.0

func FindVersionsWithSameMajorMinor(versions []core.ExpirableVersion, version semver.Version) ([]core.ExpirableVersion, error)

FindVersionsWithSameMajorMinor filters the given versions slice for versions other the given one, having the same major and minor version as the given version

func FindWorkerByName added in v1.0.0

func FindWorkerByName(workers []core.Worker, name string) *core.Worker

FindWorkerByName tries to find the worker with the given name. If it cannot be found it returns nil.

func GetAddedVersions added in v1.3.0

func GetAddedVersions(old, new []core.ExpirableVersion) map[string]int

GetAddedVersions finds versions that have been added in the new compared to the new version slice. returns a map associating the version with its index in the in the old version slice.

func GetCondition

func GetCondition(conditions []core.Condition, conditionType core.ConditionType) *core.Condition

GetCondition returns the condition with the given <conditionType> out of the list of <conditions>. In case the required type could not be found, it returns nil.

func GetConditionIndex

func GetConditionIndex(conditions []core.Condition, conditionType core.ConditionType) int

GetConditionIndex returns the index of the condition with the given <conditionType> out of the list of <conditions>. In case the required type could not be found, it returns -1.

func GetRemovedVersions added in v1.3.0

func GetRemovedVersions(old, new []core.ExpirableVersion) map[string]int

GetRemovedVersions finds versions that have been removed in the old compared to the new version slice. returns a map associating the version with its index in the in the old version slice.

func HibernationIsEnabled added in v1.4.0

func HibernationIsEnabled(shoot *core.Shoot) bool

HibernationIsEnabled checks if the given shoot's desired state is hibernated.

func QuotaScope added in v1.0.0

func QuotaScope(scopeRef corev1.ObjectReference) (string, error)

QuotaScope returns the scope of a quota scope reference.

func ShootUsesUnmanagedDNS added in v1.0.0

func ShootUsesUnmanagedDNS(shoot *core.Shoot) bool

ShootUsesUnmanagedDNS returns true if the shoot's DNS section is marked as 'unmanaged'.

func ShootWantsBasicAuthentication added in v1.0.0

func ShootWantsBasicAuthentication(kubeAPIServerConfig *core.KubeAPIServerConfig) bool

ShootWantsBasicAuthentication returns true if basic authentication is not configured or if it is set explicitly to 'true'.

func TaintsHave added in v1.0.0

func TaintsHave(taints []core.SeedTaint, key string) bool

TaintsHave returns true if the given key is part of the taints list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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