Documentation
¶
Index ¶
- type Condition
- func Creating() Condition
- func Deleting() Condition
- func ExternalLeafRefValidationFailure() Condition
- func ExternalLeafRefValidationSuccess() Condition
- func InternalLeafRefValidationFailure() Condition
- func InternalLeafRefValidationSuccess() Condition
- func ParentValidationFailure() Condition
- func ParentValidationSuccess() Condition
- func ReconcileFailure() Condition
- func ReconcileSuccess() Condition
- func TargetFound() Condition
- func TargetNotFound() Condition
- type ConditionKind
- type ConditionReason
- type ConditionedStatus
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. Kind ConditionKind `json:"kind"` // 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 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 ExternalLeafRefValidationFailure ¶
func ExternalLeafRefValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ExternalLeafRefValidationSuccess ¶
func ExternalLeafRefValidationSuccess() Condition
ExternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func InternalLeafRefValidationFailure ¶
func InternalLeafRefValidationFailure() Condition
InternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func InternalLeafRefValidationSuccess ¶
func InternalLeafRefValidationSuccess() Condition
InternalLeafRefValidationSuccess returns a condition that indicates the resource leafreference(s) are found or no leafrefs exist
func ParentValidationFailure ¶
func ParentValidationFailure() Condition
ExternalLeafRefValidationFailure returns a condition that indicates the resource leafreference(s) are missing
func ParentValidationSuccess ¶
func ParentValidationSuccess() Condition
ParentValidationFailure returns a condition that indicates the resource parent is found
func ReconcileFailure ¶
func ReconcileFailure() Condition
Unavailable returns a condition that indicates the resource is not currently available for use.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition that indicates the resource is currently successfully reconciled
func TargetFound ¶
func TargetFound() Condition
TargetFound returns a condition that indicates the resource has target(s) available for use.
func TargetNotFound ¶
func TargetNotFound() Condition
TargetNotFound returns a condition that indicates the resource has no target(s) available for use.
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 ConditionKind ¶
type ConditionKind string
A ConditionKind represents a condition kind for a resource
const ( // handled per resource ConditionKindInternalLeafRef ConditionKind = "InternalLeafrefValidation" // handled per target per resource ConditionKindExternalLeafRef ConditionKind = "ExternalLeafrefValidation" // handled per resource ConditionKindParent ConditionKind = "ParentValidation" // handled per resource ConditionKindTarget ConditionKind = "TargetFound" // handled per target per resource ConditionKindConfiguration ConditionKind = "ConfigurationStatus" )
Condition Kinds.
type ConditionReason ¶
type ConditionReason string
A ConditionReason represents the reason a resource is in a condition.
const ( ConditionReasonSuccess ConditionReason = "Success" ConditionReasonFailed ConditionReason = "Failed" )
Reasons a resource validation is or is not ok
const ( ConditionReasonFound ConditionReason = "Found" ConditionReasonNotFound ConditionReason = "Not Found" )
Reasons a resource target is or is not ok
const ( ConditionReasonNone ConditionReason = "None" ConditionReasonCreating ConditionReason = "Creating" ConditionReasonDeleting ConditionReason = "Deleting" ConditionReasonReconcileSuccess ConditionReason = "ReconcileSuccess" ConditionReasonReconcileFailure ConditionReason = "ReconcileFailure" )
Reasons a resource is or is not ready wrt configuration
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 kind may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
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(ck ConditionKind) Condition
GetCondition returns the condition for the given ConditionKind 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 kind. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.