deployment

package
v0.0.0-...-57e6299 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown                    = "unknown"
	ImagePullBackOff           = "ImagePullBackOff"
	ErrImagePull               = "ErrImagePull"
	CrashLoopBackOff           = "CrashLoopBackOff"
	CreateContainerConfigError = "CreateContainerConfigError"
	RollbackCauseAnnotation    = "rolled back by babylon"
	DownscaleCauseAnnotation   = "scaled down by babylon"
	ChangeCauseAnnotationKey   = "kubernetes.io/change-cause"
)

Variables

View Source
var (
	ErrPatchFailed              = errors.New("failed to apply patch")
	ErrFetchReplicasetFailed    = errors.New("failed to fetch replicasets")
	ErrNoRollbackCandidateFound = errors.New("no rollback candidate found")
)

Functions

func GetPodsFromReplicaSet

func GetPodsFromReplicaSet(ctx context.Context, c client.Client, rs *appsv1.ReplicaSet) (*v1.PodList, error)

func GetReplicaSetsByDeployment

func GetReplicaSetsByDeployment(ctx context.Context,
	c client.Client,
	deployment *appsv1.Deployment) (appsv1.ReplicaSetList, error)

func IsContainerCrashLoopBackOff

func IsContainerCrashLoopBackOff(restartThreshold int32, containers []v1.ContainerStatus) bool

func IsContainerImageCheckFail

func IsContainerImageCheckFail(containers []v1.ContainerStatus) bool

func IsCreateContainerConfigError

func IsCreateContainerConfigError(containers []v1.ContainerStatus) bool

func IsDeploymentDisabled

func IsDeploymentDisabled(deployment *appsv1.Deployment) bool

func IsInitContainerFailed

func IsInitContainerFailed(restartThreshold int32, initContainers []v1.ContainerStatus) (bool, string)

func SafeGetLabel

func SafeGetLabel(deploy *appsv1.Deployment, label string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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