Documentation ¶
Overview ¶
Package conditions contains status conditions helpers.
Index ¶
- func BoolToCondition(value bool) corev1.ConditionStatus
- func GetExtendedDaemonSetStatusCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, ...) *datadoghqv1alpha1.ExtendedDaemonSetCondition
- func IsConditionTrue(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, ...) bool
- func NewExtendedDaemonSetCondition(conditionType datadoghqv1alpha1.ExtendedDaemonSetConditionType, ...) datadoghqv1alpha1.ExtendedDaemonSetCondition
- func UpdateErrorCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, now metav1.Time, err error, ...)
- func UpdateExtendedDaemonSetStatusCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, now metav1.Time, ...)
- type UpdateConditionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToCondition ¶
func BoolToCondition(value bool) corev1.ConditionStatus
BoolToCondition convert bool to corev1.ConditionStatus.
func GetExtendedDaemonSetStatusCondition ¶
func GetExtendedDaemonSetStatusCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, t datadoghqv1alpha1.ExtendedDaemonSetConditionType) *datadoghqv1alpha1.ExtendedDaemonSetCondition
GetExtendedDaemonSetStatusCondition return the condition struct corresponding to the ExtendedDaemonSetConditionType provided in argument. return nil if not found.
func IsConditionTrue ¶
func IsConditionTrue(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, t datadoghqv1alpha1.ExtendedDaemonSetConditionType) bool
IsConditionTrue check if a condition is True. It not set return False.
func NewExtendedDaemonSetCondition ¶
func NewExtendedDaemonSetCondition(conditionType datadoghqv1alpha1.ExtendedDaemonSetConditionType, conditionStatus corev1.ConditionStatus, now metav1.Time, reason, message string, supportLastUpdate bool) datadoghqv1alpha1.ExtendedDaemonSetCondition
NewExtendedDaemonSetCondition returns new ExtendedDaemonSetCondition instance.
func UpdateErrorCondition ¶
func UpdateErrorCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, now metav1.Time, err error, desc string)
UpdateErrorCondition used to update the ExtendedDaemonSet status error condition.
func UpdateExtendedDaemonSetStatusCondition ¶
func UpdateExtendedDaemonSetStatusCondition(status *datadoghqv1alpha1.ExtendedDaemonSetStatus, now metav1.Time, t datadoghqv1alpha1.ExtendedDaemonSetConditionType, conditionStatus corev1.ConditionStatus, reason, desc string, options *UpdateConditionOptions)
UpdateExtendedDaemonSetStatusCondition used to update a specific ExtendedDaemonSetConditionType.
Types ¶
type UpdateConditionOptions ¶
type UpdateConditionOptions struct { // IgnoreFalseConditionIfNotExist used to avoid creating the condition when this condition if false. // If `IgnoreFalseConditionIfNotExist == `true`, the condition will not be created if the status is equal to `corev1.ConditionFalse` IgnoreFalseConditionIfNotExist bool // SupportLastUpdate is an option to avoid updating the `LastUpdateTime` during every reconcile loop. // This option is useful when only `LastTransitionTime` is the important information. SupportLastUpdate bool }
UpdateConditionOptions used to tune how te condition can be updated also if the condition doesn't exist yet, it will create it.