Documentation ¶
Overview ¶
Package condition contains condition types +kubebuilder:object:generate=true
Index ¶
- type Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
- func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
- func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
- func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition
- func (s *ConditionedStatus) SetConditions(c ...Condition)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { // Type of this condition. At most one of each condition type may apply to // a resource at any point in time. Type ConditionType `json:"type"` // Status of this condition; is it currently True, False, or Unknown? Status corev1.ConditionStatus `json:"status"` // LastTransitionTime is the last time this condition transitioned from one // status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime"` // A Reason for this condition's last transition from one status to another. Reason ConditionReason `json:"reason"` // A Message containing details about this condition's last transition from // one status to another, if any. // +optional Message string `json:"message,omitempty"` }
A Condition that may apply to a resource.
func Available ¶
func Available() Condition
Available returns a condition that indicates the resource is currently observed to be available for use.
func Creating ¶
func Creating() Condition
Creating returns a condition that indicates the resource is currently being created.
func Deleting ¶
func Deleting() Condition
Deleting returns a condition that indicates the resource is currently being deleted.
func ErrorCondition ¶
ErrorCondition generate error condition for conditionType and error
func ReadyCondition ¶
ReadyCondition generate ready condition for conditionType
func ReconcileError ¶
ReconcileError returns a condition indicating that Crossplane encountered an error while reconciling the resource. This could mean Crossplane was unable to update the resource to reflect its desired state, or that Crossplane was unable to determine the current actual state of the resource.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition indicating that Crossplane successfully completed the most recent reconciliation of the resource.
func Unavailable ¶
func Unavailable() Condition
Unavailable returns a condition that indicates the resource is not currently available for use. Unavailable should be set only when Crossplane expects the resource to be available but knows it is not, for example because its API reports it is unhealthy.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) Equal ¶
Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.
func (Condition) WithMessage ¶
WithMessage returns a condition by adding the provided message to existing condition.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition. nolint:golint
const ( ReasonAvailable ConditionReason = "Available" ReasonCreating ConditionReason = "Creating" ReasonDeleting ConditionReason = "Deleting" )
Reasons a resource is or is not ready.
const ( ReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ReasonReconcileError ConditionReason = "ReconcileError" )
Reasons a resource is or is not synced.
type ConditionType ¶
type ConditionType string
A ConditionType represents a condition a resource could be in. nolint:golint
const ( // TypeReady resources are believed to be ready to handle work. TypeReady ConditionType = "Ready" // TypeSynced resources are believed to be in sync with the // Kubernetes resources that manage their lifecycle. TypeSynced ConditionType = "Synced" )
Condition types.
type ConditionedStatus ¶
type ConditionedStatus struct { // Conditions of the resource. // +optional Conditions []Condition `json:"conditions,omitempty"` }
A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
func (*ConditionedStatus) DeepCopy ¶
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (*ConditionedStatus) DeepCopyInto ¶
func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConditionedStatus) Equal ¶
func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool
Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.
func (*ConditionedStatus) GetCondition ¶
func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition
GetCondition returns the condition for the given ConditionType if exists, otherwise returns nil
func (*ConditionedStatus) SetConditions ¶
func (s *ConditionedStatus) SetConditions(c ...Condition)
SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.