v1

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

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) DeepCopy added in v0.3.7

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto added in v0.3.7

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

func (Condition) WithMessage

func (c Condition) WithMessage(msg string) Condition

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) DeepCopy added in v0.3.7

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.

func (*ConditionedStatus) DeepCopyInto added in v0.3.7

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(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.

type Reference added in v0.3.10

type Reference struct {
	// Name of the referenced object.
	Name string `json:"name"`
}

A Reference to a named object.

func (*Reference) DeepCopy added in v0.3.10

func (in *Reference) DeepCopy() *Reference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reference.

func (*Reference) DeepCopyInto added in v0.3.10

func (in *Reference) DeepCopyInto(out *Reference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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