conditions

package
v0.2.1-0...-ea1636d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyConditions

func DeepCopyConditions(in []machinev1.Condition) []machinev1.Condition

func FalseCondition

func FalseCondition(t machinev1.ConditionType, reason string, severity machinev1.ConditionSeverity, messageFormat string, messageArgs ...interface{}) *machinev1.Condition

FalseCondition returns a condition with Status=False and the given type.

func Get

func Get(from interface{}, t machinev1.ConditionType) *machinev1.Condition

Get returns the condition with the given type, if the condition does not exists, it returns nil.

func GetDeploymentCondition

func GetDeploymentCondition(deployment *appsv1.Deployment, conditionType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

GetDeploymentCondition returns node condition by type

func GetNodeCondition

func GetNodeCondition(node *corev1.Node, conditionType corev1.NodeConditionType) *corev1.NodeCondition

GetNodeCondition returns node condition by type

func IsFalse

func IsFalse(from interface{}, t machinev1.ConditionType) bool

IsFalse is true if the condition with the given type is False, otherwise it return false if the condition is not False or if the condition does not exist (is nil).

func IsTrue

func IsTrue(from interface{}, t machinev1.ConditionType) bool

IsTrue is true if the condition with the given type is True, otherwise it return false if the condition is not True or if the condition does not exist (is nil).

func MarkFalse

func MarkFalse(to interface{}, t machinev1.ConditionType, reason string, severity machinev1.ConditionSeverity, messageFormat string, messageArgs ...interface{})

MarkFalse sets Status=False for the condition with the given type.

func MarkTrue

func MarkTrue(to interface{}, t machinev1.ConditionType)

MarkTrue sets Status=True for the condition with the given type.

func MatchCondition

func MatchCondition(expected machinev1.Condition) types.GomegaMatcher

MatchCondition returns a custom matcher to check equality of mapiv1.Condition

func MatchConditions

func MatchConditions(expected []machinev1.Condition) types.GomegaMatcher

MatchConditions returns a custom matcher to check equality of mapiv1.Conditions

func Set

func Set(to interface{}, condition *machinev1.Condition)

Set sets the given condition.

NOTE: If a condition already exists, the LastTransitionTime is updated only if a change is detected in any of the following fields: Status, Reason, Severity and Message.

func TrueCondition

func TrueCondition(t machinev1.ConditionType) *machinev1.Condition

TrueCondition returns a condition with Status=True and the given type.

func TrueConditionWithReason

func TrueConditionWithReason(t machinev1.ConditionType, reason string, messageFormat string, messageArgs ...interface{}) *machinev1.Condition

TrueConditionWithReason returns a condition with Status=True and the given type.

func UnknownCondition

func UnknownCondition(t machinev1.ConditionType, reason string, messageFormat string, messageArgs ...interface{}) *machinev1.Condition

UnknownCondition returns a condition with Status=Unknown and the given type.

Types

type GetterSetter

type GetterSetter interface {
	runtime.Object
	metav1.Object

	// GetConditions returns the list of conditions for a machine API object.
	GetConditions() []machinev1.Condition

	// SetConditions sets the list of conditions for a machine API object.
	SetConditions([]machinev1.Condition)
}

type MachineHealthCheckWrapper

type MachineHealthCheckWrapper struct {
	*machinev1.MachineHealthCheck
}

func (*MachineHealthCheckWrapper) GetConditions

func (m *MachineHealthCheckWrapper) GetConditions() []machinev1.Condition

func (*MachineHealthCheckWrapper) SetConditions

func (m *MachineHealthCheckWrapper) SetConditions(conditions []machinev1.Condition)

type MachineSetWrapper

type MachineSetWrapper struct {
	*machinev1.MachineSet
}

func (*MachineSetWrapper) GetConditions

func (m *MachineSetWrapper) GetConditions() []machinev1.Condition

func (*MachineSetWrapper) SetConditions

func (m *MachineSetWrapper) SetConditions(conditions []machinev1.Condition)

type MachineWrapper

type MachineWrapper struct {
	*machinev1.Machine
}

func (*MachineWrapper) GetConditions

func (m *MachineWrapper) GetConditions() []machinev1.Condition

func (*MachineWrapper) SetConditions

func (m *MachineWrapper) SetConditions(conditions []machinev1.Condition)

Jump to

Keyboard shortcuts

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