utils

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetThresholdForCondition

func GetThresholdForCondition(conditions []config.ConditionThreshold, conditionType gardencorev1beta1.ConditionType) time.Duration

GetThresholdForCondition returns the threshold duration from the configuration for the provided condition type.

func PatchSeedCondition

func PatchSeedCondition(ctx context.Context, log logr.Logger, c client.StatusWriter, seed *gardencorev1beta1.Seed, condition gardencorev1beta1.Condition) error

PatchSeedCondition patches the seed conditions in case they need to be updated.

func SetToProgressingOrFalse

func SetToProgressingOrFalse(
	clock clock.Clock,
	conditionThreshold time.Duration,
	condition gardencorev1beta1.Condition,
	reason, message string,
	codes ...gardencorev1beta1.ErrorCode,
) gardencorev1beta1.Condition

SetToProgressingOrFalse sets the provided condition to Progressing or to False based on whether the provided conditionThreshold has passed compared to the condition's last transition time.

func SetToProgressingOrUnknown

func SetToProgressingOrUnknown(
	clock clock.Clock,
	conditionThreshold time.Duration,
	condition gardencorev1beta1.Condition,
	reason, message string,
	codes ...gardencorev1beta1.ErrorCode,
) gardencorev1beta1.Condition

SetToProgressingOrUnknown sets the provided condition to Progressing or to Unknown based on whether the provided conditionThreshold has passed compared to the condition's last transition time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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