utils

package
v0.0.0-...-799847d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeploymentCondition

func GetDeploymentCondition(conditions []appsv1.DeploymentCondition, conditionType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

GetDeploymentCondition returns the condition with the given type or nil, if it is not included.

func IsDeploymentReady

func IsDeploymentReady(deployment *appsv1.Deployment) bool

IsDeploymentReady returns true if the current generation has been observed by the deployment controller and has been fully rolled out.

func PickRandom

func PickRandom[T any](in []T) T

PickRandom picks a random element from the given slice.

func RandomName

func RandomName(n int) string

RandomName generates a random string with n characters that can be used as part of API object names.

func RunningInCluster

func RunningInCluster() bool

RunningInCluster implements a heuristic for determining whether the process is running in a cluster or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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