checker

package
v1.104.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtensionCondition

type ExtensionCondition struct {
	Condition          gardencorev1beta1.Condition
	ExtensionType      string
	ExtensionName      string
	ExtensionNamespace string
	LastHeartbeatTime  *metav1.MicroTime
}

ExtensionCondition contains information about the extension type, name, namespace and the respective condition object.

type HealthChecker

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

HealthChecker contains the condition thresholds.

func NewHealthChecker

func NewHealthChecker(
	reader client.Reader,
	clock clock.Clock,
	conditionThresholds map[gardencorev1beta1.ConditionType]time.Duration,
	lastOperation *gardencorev1beta1.LastOperation,
) *HealthChecker

NewHealthChecker creates a new health checker.

func (*HealthChecker) CheckControlPlane

func (h *HealthChecker) CheckControlPlane(
	ctx context.Context,
	namespace string,
	requiredControlPlaneDeployments sets.Set[string],
	requiredControlPlaneEtcds sets.Set[string],
	condition gardencorev1beta1.Condition,
) (
	*gardencorev1beta1.Condition,
	error,
)

CheckControlPlane checks whether the given required control-plane component deployments and ETCDs are complete and healthy.

func (*HealthChecker) CheckExtensionCondition

func (h *HealthChecker) CheckExtensionCondition(condition gardencorev1beta1.Condition, extensionsConditions []ExtensionCondition, staleExtensionHealthCheckThreshold *metav1.Duration) *gardencorev1beta1.Condition

CheckExtensionCondition checks whether the conditions provided by extensions are healthy.

func (*HealthChecker) CheckLoggingControlPlane

func (h *HealthChecker) CheckLoggingControlPlane(
	ctx context.Context,
	namespace string,
	eventLoggingEnabled bool,
	condition gardencorev1beta1.Condition,
) (
	*gardencorev1beta1.Condition,
	error,
)

CheckLoggingControlPlane checks whether the logging components are complete and healthy.

func (*HealthChecker) CheckManagedResource

func (h *HealthChecker) CheckManagedResource(condition gardencorev1beta1.Condition, mr *resourcesv1alpha1.ManagedResource, managedResourceProgressingThreshold *metav1.Duration) *gardencorev1beta1.Condition

CheckManagedResource checks the conditions of the given managed resource and reflects the state in the returned condition.

func (*HealthChecker) CheckManagedResources added in v1.91.0

func (h *HealthChecker) CheckManagedResources(
	condition gardencorev1beta1.Condition,
	managedResources []resourcesv1alpha1.ManagedResource,
	filterFunc func(resourcesv1alpha1.ManagedResource) bool,
	progressingThreshold *metav1.Duration,
) *gardencorev1beta1.Condition

CheckManagedResources checks multiple ManagedResources in case the provided filter func returns true. If their state indicates issues then this is reflected in the state of the provided condition. If there are no issues, nil is returned.

func (*HealthChecker) CheckMonitoringControlPlane

func (h *HealthChecker) CheckMonitoringControlPlane(
	ctx context.Context,
	namespace string,
	requiredMonitoringDeployments sets.Set[string],
	appsSelector labels.Selector,
	condition gardencorev1beta1.Condition,
) (
	*gardencorev1beta1.Condition,
	error,
)

CheckMonitoringControlPlane checks the monitoring components of the control-plane.

func (*HealthChecker) CheckNodes

func (h *HealthChecker) CheckNodes(condition gardencorev1beta1.Condition, nodes []corev1.Node, workerGroupName string, workerGroupKubernetesVersion *semver.Version) *gardencorev1beta1.Condition

CheckNodes whether the given nodes are ready and the version in the node status is of the same major-minor as given in 'workerGroupKubernetesVersion'.

Jump to

Keyboard shortcuts

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