clustereligibilitychecker

package
v0.9.9-experimental-2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package clustereligibilitychecker features a utility for verifying if a member cluster is eligible for resource placement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterEligibilityChecker

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

func New

func New(opts ...Option) *ClusterEligibilityChecker

New returns a new cluster eligibility checker.

func (*ClusterEligibilityChecker) IsEligible

func (checker *ClusterEligibilityChecker) IsEligible(cluster *clusterv1beta1.MemberCluster) (eligible bool, reason string)

IsEligible returns if a cluster is eligible for resource placement; if not, it will also return the reason.

type Option

type Option func(*checkerOptions)

Option helps set up the plugin.

func WithClusterHealthCheckTimeout

func WithClusterHealthCheckTimeout(timeout time.Duration) Option

WithClusterHealthCheckTimeout sets the timeout value this plugin uses for checking if a cluster is still in a healthy state.

func WithClusterHeartbeatCheckTimeout

func WithClusterHeartbeatCheckTimeout(timeout time.Duration) Option

WithClusterHeartbeatCheckTimeout sets the timeout value this plugin uses for checking if a cluster has been disconnected from the fleet for a prolonged period of time.

Jump to

Keyboard shortcuts

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