healthcheck

package
v0.121.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthChecker

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

func NewHealthChecker

func NewHealthChecker(lsDeployments *config.LsDeployments, hostClient client.Client) *HealthChecker

func (*HealthChecker) ExecuteHealthCheck

func (c *HealthChecker) ExecuteHealthCheck(ctx context.Context)

func (*HealthChecker) StartPeriodicalHealthCheck

func (c *HealthChecker) StartPeriodicalHealthCheck(ctx context.Context, logger logging.Logger) error

StartPeriodicalHealthCheck first initializes and then starts the periodical health check. A landscaper instance has a unique LsHealthCheck resource on its host cluster (namespace: lsDeployments.DeploymentsNamespace, name: lsDeployments.LsHealthCheckName). The initialization creates this resource if it does not yet exist, and deletes all other LsHealthCheck resources in the same namespace. If the initialization fails, the function returns an error. If it succeeds, it starts the periodical health check. In this case the function does not return until the context is cancelled. Each execution of the healthcheck checks the number of replicas of the Deployments listed in lsDeployments, and updates the status of the LsHealthCheck resource. Note however, that a failure is only written to the LsHealthCheck resource if it occurs twice in succession.

Jump to

Keyboard shortcuts

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