status

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ClusterPropagationOK PropagationStatus = ""
	WaitingForRemoval    PropagationStatus = "WaitingForRemoval"

	// Cluster-specific errors
	ClusterNotReady        PropagationStatus = "ClusterNotReady"
	CachedRetrievalFailed  PropagationStatus = "CachedRetrievalFailed"
	ComputeResourceFailed  PropagationStatus = "ComputeResourceFailed"
	ApplyOverridesFailed   PropagationStatus = "ApplyOverridesFailed"
	CreationFailed         PropagationStatus = "CreationFailed"
	UpdateFailed           PropagationStatus = "UpdateFailed"
	DeletionFailed         PropagationStatus = "DeletionFailed"
	LabelRemovalFailed     PropagationStatus = "LabelRemovalFailed"
	RetrievalFailed        PropagationStatus = "RetrievalFailed"
	AlreadyExists          PropagationStatus = "AlreadyExists"
	FieldRetentionFailed   PropagationStatus = "FieldRetentionFailed"
	VersionRetrievalFailed PropagationStatus = "VersionRetrievalFailed"
	ClientRetrievalFailed  PropagationStatus = "ClientRetrievalFailed"
	ManagedLabelFalse      PropagationStatus = "ManagedLabelFalse"

	// Operation timeout errors
	CreationTimedOut     PropagationStatus = "CreationTimedOut"
	UpdateTimedOut       PropagationStatus = "UpdateTimedOut"
	DeletionTimedOut     PropagationStatus = "DeletionTimedOut"
	LabelRemovalTimedOut PropagationStatus = "LabelRemovalTimedOut"

	AggregateSuccess       AggregateReason = ""
	ClusterRetrievalFailed AggregateReason = "ClusterRetrievalFailed"
	ComputePlacementFailed AggregateReason = "ComputePlacementFailed"
	CheckClusters          AggregateReason = "CheckClusters"
	NamespaceNotFederated  AggregateReason = "NamespaceNotFederated"

	PropagationConditionType ConditionType = "Propagation"
)

Variables

This section is empty.

Functions

func IsRecoverableError added in v0.8.1

func IsRecoverableError(status PropagationStatus) bool

IsRecoverableError returns whether the given PropagationStatus is a possibly recoverable error.

func SetFederatedStatus

func SetFederatedStatus(fedObject *unstructured.Unstructured, reason AggregateReason, collectedStatus CollectedPropagationStatus, collectedResourceStatus CollectedResourceStatus, resourceStatusCollection bool) (bool, error)

SetFederatedStatus sets the conditions and clusters fields of the federated resource's object map. Returns a boolean indication of whether status should be written to the API.

Types

type AggregateReason

type AggregateReason string

type CollectedPropagationStatus

type CollectedPropagationStatus struct {
	StatusMap        PropagationStatusMap
	ResourcesUpdated bool
}

type CollectedResourceStatus added in v0.6.0

type CollectedResourceStatus struct {
	StatusMap        map[string]interface{}
	ResourcesUpdated bool
}

type ConditionType

type ConditionType string

type GenericClusterStatus

type GenericClusterStatus struct {
	Name         string            `json:"name"`
	Status       PropagationStatus `json:"status,omitempty"`
	RemoteStatus interface{}       `json:"remoteStatus,omitempty"`
}

type GenericCondition

type GenericCondition struct {
	// Type of cluster condition
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status apiv1.ConditionStatus `json:"status"`
	// Last time reconciliation resulted in an error or the last time a
	// change was propagated to member clusters.
	// +optional
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
	// Last time the condition transit from one status to another.
	// +optional
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason AggregateReason `json:"reason,omitempty"`
}

type GenericFederatedResource

type GenericFederatedResource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Status *GenericFederatedStatus `json:"status,omitempty"`
}

type GenericFederatedStatus

type GenericFederatedStatus struct {
	ObservedGeneration int64                  `json:"observedGeneration,omitempty"`
	Conditions         []*GenericCondition    `json:"conditions,omitempty"`
	Clusters           []GenericClusterStatus `json:"clusters,omitempty"`
}

type PropagationStatus

type PropagationStatus string

type PropagationStatusMap

type PropagationStatusMap map[string]PropagationStatus

Jump to

Keyboard shortcuts

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