lease

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAddonPodFunc

func CheckAddonPodFunc(podGetter corev1client.PodsGetter, namespace, labelSelector string) func() bool

CheckAddonPodFunc checks whether the agent pod is running

func CheckManagedClusterHealthFunc added in v0.7.0

func CheckManagedClusterHealthFunc(managedClusterDiscoveryClient discovery.DiscoveryInterface) func() bool

CheckManagedClusterHealthFunc checks the health status of the cluster api server

Types

type LeaseUpdater

type LeaseUpdater interface {
	// Start starts a goroutine to update lease
	Start(ctx context.Context)

	// WithHubLeaseConfig sets the lease config on hub cluster. It allows LeaseUpdater to create/update
	// addon lease on hub cluster when resource 'Lease' is not available on managed cluster.
	WithHubLeaseConfig(config *rest.Config, clusterName string) LeaseUpdater
}

LeaseUpdater is to update lease with certain period

func NewLeaseUpdater

func NewLeaseUpdater(
	kubeClient kubernetes.Interface,
	leaseName, leaseNamespace string,
	healthCheckFuncs ...func() bool,
) LeaseUpdater

Jump to

Keyboard shortcuts

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