shared

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PeerUpdateInterval = 30 * time.Second
	ApiCheckInterval   = 1 * time.Second
	MaxErrorThreshold  = 1
	// CalculatedRebootDuration is the mock calculator's result
	CalculatedRebootDuration = 3 * time.Second
	Namespace                = "self-node-remediation"
	UnhealthyNodeName        = "node1"
	PeerNodeName             = "node2"
	DsDummyImageName         = "dummy-image"
)

Variables

This section is empty.

Functions

func GenerateTestConfig added in v0.9.0

func VerifySNRStatusExist added in v0.9.0

func VerifySNRStatusExist(k8sClient client.Client, snr *selfnoderemediationv1alpha1.SelfNodeRemediation, statusType string, conditionStatus metav1.ConditionStatus)

Types

type K8sClientWrapper

type K8sClientWrapper struct {
	client.Client
	Reader                         client.Reader
	ShouldSimulateFailure          bool
	ShouldSimulatePodDeleteFailure bool
	SimulatedFailureMessage        string
}

func (*K8sClientWrapper) List

func (kcw *K8sClientWrapper) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

type MockRebootDurationCalculator added in v0.9.0

type MockRebootDurationCalculator struct{}

func (MockRebootDurationCalculator) GetRebootDuration added in v0.9.0

func (m MockRebootDurationCalculator) GetRebootDuration(_ context.Context, _ *corev1.Node) (time.Duration, error)

func (MockRebootDurationCalculator) SetConfig added in v0.9.0

Jump to

Keyboard shortcuts

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