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 GenerateTestConfig() *selfnoderemediationv1alpha1.SelfNodeRemediationConfig
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 (MockRebootDurationCalculator) SetConfig ¶ added in v0.9.0
func (m MockRebootDurationCalculator) SetConfig(_ *selfnoderemediationv1alpha1.SelfNodeRemediationConfig)
Click to show internal directories.
Click to hide internal directories.