statecheck

package
v0.0.0-...-67aceb4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NewReplicaSetAvailableReason = "NewReplicaSetAvailable"
	FoundNewReplicaSetReason     = "FoundNewReplicaSet"
	NewReplicaSetCreatedReason   = "NewReplicaSetCreated"
	ReplicaSetUpdatedReason      = "ReplicaSetUpdated"
)

Variables

View Source
var (
	ErrNoManagerProvided = errors.New("failed to find manager in provided resources")
	ErrNoStateDetermined = errors.New("failed to determine state for manager")
)

Functions

func GetPodsState

func GetPodsState(podList *apicorev1.PodList) shared.State

func IsStatefulSetReady

func IsStatefulSetReady(statefulSet *apiappsv1.StatefulSet) bool

Types

type DeploymentStateCheck

type DeploymentStateCheck struct{}

func NewDeploymentStateCheck

func NewDeploymentStateCheck() *DeploymentStateCheck

func (*DeploymentStateCheck) GetState

func (*DeploymentStateCheck) GetState(
	deploy *apiappsv1.Deployment,
) (shared.State, error)

type DeploymentStateChecker

type DeploymentStateChecker interface {
	GetState(deploy *apiappsv1.Deployment) (shared.State, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

type ManagerKind

type ManagerKind string
const (
	DeploymentKind  ManagerKind = "Deployment"
	StatefulSetKind ManagerKind = "StatefulSet"
)

type ManagerStateCheck

type ManagerStateCheck struct {
	// contains filtered or unexported fields
}

func NewManagerStateCheck

func NewManagerStateCheck(statefulSetChecker StatefulSetStateChecker,
	deploymentChecker DeploymentStateChecker,
) *ManagerStateCheck

func (*ManagerStateCheck) GetState

func (m *ManagerStateCheck) GetState(ctx context.Context,
	clnt client.Client,
	resources []*resource.Info,
) (shared.State, error)

Determines the state based on the manager. The manager may either be a Deployment or a StatefulSet and must be included in the provided resources. Will be refactored with https://github.com/kyma-project/lifecycle-manager/issues/1831

type StatefulSetStateCheck

type StatefulSetStateCheck struct{}

func NewStatefulSetStateCheck

func NewStatefulSetStateCheck() *StatefulSetStateCheck

func (*StatefulSetStateCheck) GetState

func (*StatefulSetStateCheck) GetState(ctx context.Context,
	clnt client.Client,
	statefulSet *apiappsv1.StatefulSet,
) (shared.State, error)

type StatefulSetStateChecker

type StatefulSetStateChecker interface {
	GetState(ctx context.Context, clnt client.Client, statefulSet *apiappsv1.StatefulSet) (shared.State, error)
}

Jump to

Keyboard shortcuts

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