v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReadyCondition reflects the overall readiness status of a resource.
	ReadyCondition ConditionType = "Ready"

	// DeleteCondition reflects that the resource has finished its cleanup process.
	DeleteCondition ConditionType = "Delete"

	// ClusterListEmpty is set when the resources ClusterSelector results in an empty ClusterList.
	ClusterListEmpty ConditionType = "ClusterListEmpty"

	// OwnerLabelSetCondition reflects that the resource has the owned-by label set to an existing support-group Team.
	OwnerLabelSetCondition ConditionType = "OwnerLabelSet"
	// OwnerLabelMissingReason is set when the resource is missing the owned-by label.
	OwnerLabelMissingReason ConditionReason = "OwnerLabelMissing"
	// OwnerLabelSetToNotExistingTeamReason is set when the resource has the owned-by label set to a non-existing Team.
	OwnerLabelSetToNotExistingTeamReason ConditionReason = "OwnerLabelNotExistingTeam"
	// OwnerLabelSetToNonSupportGroupTeamReason is set when the resource has the owned-by label set to a non-support-group Team.
	OwnerLabelSetToNonSupportGroupTeamReason ConditionReason = "OwnerLabelSetToNonSupportGroupTeam"
)

Common condition types and reasons used across Greenhouse resources.

View Source
const (
	// FailedEvent is used if the resource reconciliation failed
	FailedEvent = "Failed"
	// SuccessfulDeletedEvent is used if the resource was deleted successfully
	SuccessfulDeletedEvent = "SuccessfulDeleted"
	// FailedDeleteEvent is used if delete failed
	FailedDeleteEvent = "FailedDelete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	// Type of the condition.
	Type ConditionType `json:"type"`

	// Status of the condition.
	Status metav1.ConditionStatus `json:"status"`

	// Reason is a one-word, CamelCase reason for the condition's last transition.
	Reason ConditionReason `json:"reason,omitempty"`

	// LastTransitionTime is the last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// Message is an optional human-readable message indicating details about the last transition.
	Message string `json:"message,omitempty"`
}

Condition contains additional information on the state of a resource.

func FalseCondition

func FalseCondition(t ConditionType, reason ConditionReason, message string) Condition

FalseCondition returns a Condition with ConditionFalse and the given type, reason and message. LastTransitionTime is set to now.

func NewCondition

func NewCondition(condition ConditionType, status metav1.ConditionStatus, reason ConditionReason, message string) Condition

NewCondition returns a Condition with the given type, status, reason and message. LastTransitionTime is set to now.

func TrueCondition

func TrueCondition(t ConditionType, reason ConditionReason, message string) Condition

TrueCondition returns a Condition with ConditionTrue and the given type, reason and message. LastTransitionTime is set to now.

func UnknownCondition

func UnknownCondition(t ConditionType, reason ConditionReason, message string) Condition

UnknownCondition returns a Condition with ConditionUnknown and the given type, reason and message. LastTransitionTime is set to now.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

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) IsFalse

func (c *Condition) IsFalse() bool

IsFalse returns true if the condition is false.

func (*Condition) IsTrue

func (c *Condition) IsTrue() bool

IsTrue returns true if the condition is true.

func (*Condition) IsUnknown

func (c *Condition) IsUnknown() bool

type ConditionReason

type ConditionReason string

ConditionReason is a valid reason for a condition of a resource.

type ConditionType

type ConditionType string

ConditionType is a valid condition of a resource.

type StatusConditions

type StatusConditions struct {
	// +listType="map"
	// +listMapKey=type
	Conditions []Condition `json:"conditions,omitempty"`
}

A StatusConditions contains a list of conditions. Only one condition of a given type may exist in the list.

func (*StatusConditions) DeepCopy

func (in *StatusConditions) DeepCopy() *StatusConditions

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

func (*StatusConditions) DeepCopyInto

func (in *StatusConditions) DeepCopyInto(out *StatusConditions)

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

func (*StatusConditions) GetConditionByType

func (sc *StatusConditions) GetConditionByType(conditionType ConditionType) *Condition

GetConditionByType returns the condition of the given type, if it exists.

func (*StatusConditions) IsReadyTrue

func (sc *StatusConditions) IsReadyTrue() bool

IsReadyTrue returns true if the Ready condition is true.

func (*StatusConditions) SetConditions

func (sc *StatusConditions) SetConditions(conditionsToSet ...Condition)

SetConditions sets the corresponding Conditions in StatusConditions to newConditions. If the LastTransitionTime of a new Condition is not set, it is set to the current time. If a Condition of the same ConditionType exists, it is updated. The LastTransitionTime is only updated if the Status changes. If a condition of the same ConditionType does not exist, it is appended.

Jump to

Keyboard shortcuts

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