func IsStatusConditionFalse(conditions []Condition, conditionType ConditionType) bool
IsStatusConditionFalse returns true when the conditionType is present and set to `corev1.ConditionFalse`
func IsStatusConditionPresentAndEqual(conditions []Condition, conditionType ConditionType, status corev1.ConditionStatus) bool
IsStatusConditionPresentAndEqual returns true when conditionType is present and equal to status.
func IsStatusConditionTrue(conditions []Condition, conditionType ConditionType) bool
IsStatusConditionTrue returns true when the conditionType is present and set to `corev1.ConditionTrue`
func IsStatusConditionUnknown(conditions []Condition, conditionType ConditionType) bool
IsStatusConditionUnknown returns true when the conditionType is present and set to `corev1.ConditionUnknown`
func RemoveStatusCondition(conditions *[]Condition, conditionType ConditionType)
RemoveStatusCondition removes the corresponding conditionType from conditions.
func SetStatusCondition(conditions *[]Condition, newCondition Condition)
SetStatusCondition sets the corresponding condition in conditions to newCondition.
func SetStatusConditionNoHeartbeat(conditions *[]Condition, newCondition Condition)
SetStatusConditionNoHearbeat sets the corresponding condition in conditions to newCondition without setting lastHeartbeatTime.
Condition represents the state of the operator's reconciliation functionality. +k8s:deepcopy-gen=true
type Condition struct { Type ConditionType `json:"type" description:"type of condition ie. Available|Progressing|Degraded."` Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` // +optional Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"` // +optional Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"` // +optional LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime" description:"last time we got an update on a given condition"` // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime" description:"last time the condition transit from one status to another"` }
func FindStatusCondition(conditions []Condition, conditionType ConditionType) *Condition
FindStatusCondition finds the conditionType in conditions.
func (in *Condition) DeepCopy() *Condition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (in *Condition) DeepCopyInto(out *Condition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
ConditionType is the state of the operator's reconciliation functionality.
type ConditionType string
const ( // ConditionAvailable indicates that the resources maintained by the operator, // is functional and available in the cluster. ConditionAvailable ConditionType = "Available" // ConditionProgressing indicates that the operator is actively making changes to the resources maintained by the // operator ConditionProgressing ConditionType = "Progressing" // ConditionDegraded indicates that the resources maintained by the operator are not functioning completely. // An example of a degraded state would be if not all pods in a deployment were running. // It may still be available, but it is degraded ConditionDegraded ConditionType = "Degraded" // ConditionUpgradeable indicates whether the resources maintained by the operator are in a state that is safe to upgrade. // When `False`, the resources maintained by the operator should not be upgraded and the // message field should contain a human readable description of what the administrator should do to // allow the operator to successfully update the resources maintained by the operator. ConditionUpgradeable ConditionType = "Upgradeable" )