conditions

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConditionForResourceSubmittedDeliverable added in v0.4.0

func AddConditionForResourceSubmittedDeliverable(conditionManager *ConditionManager, isOwner bool, err error)

func AddConditionForResourceSubmittedWorkload added in v0.4.0

func AddConditionForResourceSubmittedWorkload(conditionManager *ConditionManager, isOwner bool, err error)

func AlwaysHealthyResourcesHealthyCondition added in v0.4.0

func AlwaysHealthyResourcesHealthyCondition() metav1.Condition

func BlueprintsFailedToListCreatedObjectsCondition added in v0.6.0

func BlueprintsFailedToListCreatedObjectsCondition(isOwner bool, err error) metav1.Condition

func ClientBuilderErrorCondition added in v0.4.0

func ClientBuilderErrorCondition(err error) metav1.Condition

func DeliverableMissingLabelsCondition added in v0.4.0

func DeliverableMissingLabelsCondition() metav1.Condition

func DeliveryNotFoundCondition added in v0.4.0

func DeliveryNotFoundCondition(labels map[string]string) metav1.Condition

func DeliveryReadyCondition added in v0.4.0

func DeliveryReadyCondition() metav1.Condition

func DeploymentConditionNotMetCondition added in v0.4.0

func DeploymentConditionNotMetCondition(err error) metav1.Condition

func DeploymentFailedConditionMetCondition added in v0.4.0

func DeploymentFailedConditionMetCondition(err error) metav1.Condition

func FailedToListCreatedObjectsCondition added in v0.4.0

func FailedToListCreatedObjectsCondition(err error) metav1.Condition

func MissingReadyInDeliveryCondition added in v0.4.0

func MissingReadyInDeliveryCondition(deliveryReadyCondition metav1.Condition) metav1.Condition

func MissingReadyInSupplyChainCondition added in v0.4.0

func MissingReadyInSupplyChainCondition(supplyChainReadyCondition metav1.Condition) metav1.Condition

func MissingValueAtPathCondition added in v0.4.0

func MissingValueAtPathCondition(isOwner bool, obj *unstructured.Unstructured, expression string, qualifiedResource string) metav1.Condition

func MultiMatchNoMatchesCondition added in v0.4.0

func MultiMatchNoMatchesCondition() metav1.Condition

func MultiMatchResourcesHealthyCondition added in v0.4.0

func MultiMatchResourcesHealthyCondition(status metav1.ConditionStatus, reason, message string) metav1.Condition

func NoResourceResourcesHealthyCondition added in v0.4.0

func NoResourceResourcesHealthyCondition() metav1.Condition

func NoStampedObjectResourcesHealthyCondition added in v0.4.0

func NoStampedObjectResourcesHealthyCondition() metav1.Condition

func OutputAvailableResourcesHealthyCondition added in v0.4.0

func OutputAvailableResourcesHealthyCondition() metav1.Condition

func OutputNotAvailableResourcesHealthyCondition added in v0.4.0

func OutputNotAvailableResourcesHealthyCondition() metav1.Condition

func OutputPathNotSatisfiedCondition added in v0.4.0

func OutputPathNotSatisfiedCondition(obj *unstructured.Unstructured, qualifiedResource string, errMsg string) metav1.Condition

func ResolveTemplateOptionsErrorCondition added in v0.4.0

func ResolveTemplateOptionsErrorCondition(isOwner bool, err error) metav1.Condition

func ResourceRealizerBuilderErrorCondition added in v0.4.0

func ResourceRealizerBuilderErrorCondition(err error) metav1.Condition

func ResourceSubmittedCondition added in v0.4.0

func ResourceSubmittedCondition(isPassThrough bool) metav1.Condition

func ResourcesSubmittedCondition added in v0.4.0

func ResourcesSubmittedCondition(isOwner bool) metav1.Condition

func RunTemplateMissingCondition added in v0.4.0

func RunTemplateMissingCondition(err error) metav1.Condition

func RunTemplateReadyCondition added in v0.4.0

func RunTemplateReadyCondition() metav1.Condition

func RunnableServiceAccountNotFoundCondition added in v0.5.3

func RunnableServiceAccountNotFoundCondition(err error) metav1.Condition

func RunnableServiceAccountTokenErrorCondition added in v0.5.3

func RunnableServiceAccountTokenErrorCondition(err error) metav1.Condition

func RunnableTemplateStampFailureCondition added in v0.4.0

func RunnableTemplateStampFailureCondition(err error) metav1.Condition

func ServiceAccountNotFoundCondition added in v0.5.0

func ServiceAccountNotFoundCondition(err error) metav1.Condition

func ServiceAccountTokenErrorCondition added in v0.5.0

func ServiceAccountTokenErrorCondition(err error) metav1.Condition

func SingleConditionMatchCondition added in v0.4.0

func SingleConditionMatchCondition(status metav1.ConditionStatus, conditionName, message string) metav1.Condition

func StampedObjectConditionKnown added in v0.4.2

func StampedObjectConditionKnown(condition *metav1.Condition) metav1.Condition

func StampedObjectConditionUnknown added in v0.4.2

func StampedObjectConditionUnknown() metav1.Condition

func StampedObjectRejectedByAPIServerCondition added in v0.4.0

func StampedObjectRejectedByAPIServerCondition(err error) metav1.Condition

func SupplyChainNotFoundCondition added in v0.4.0

func SupplyChainNotFoundCondition(labels map[string]string) metav1.Condition

func SupplyChainReadyCondition added in v0.4.0

func SupplyChainReadyCondition() metav1.Condition

func TemplateObjectRetrievalFailureCondition added in v0.4.0

func TemplateObjectRetrievalFailureCondition(isOwner bool, err error) metav1.Condition

func TemplateOptionsMatchErrorCondition added in v0.4.0

func TemplateOptionsMatchErrorCondition(isOwner bool, err error) metav1.Condition

func TemplateRejectedByAPIServerCondition added in v0.4.0

func TemplateRejectedByAPIServerCondition(isOwner bool, err error) metav1.Condition

func TemplateStampFailureByObservedGenerationCondition added in v0.4.0

func TemplateStampFailureByObservedGenerationCondition(err error) metav1.Condition

func TemplateStampFailureCondition added in v0.4.0

func TemplateStampFailureCondition(isOwner bool, err error) metav1.Condition

func TemplatesFoundCondition added in v0.4.0

func TemplatesFoundCondition() metav1.Condition

func TemplatesNotFoundCondition added in v0.4.0

func TemplatesNotFoundCondition(resourceNames []string) metav1.Condition

func TooManyDeliveryMatchesCondition added in v0.4.0

func TooManyDeliveryMatchesCondition() metav1.Condition

func TooManySupplyChainMatchesCondition added in v0.4.0

func TooManySupplyChainMatchesCondition() metav1.Condition

func UnknownErrorCondition added in v0.4.0

func UnknownErrorCondition(err error) metav1.Condition

func UnknownResourceErrorCondition added in v0.4.0

func UnknownResourceErrorCondition(isOwner bool, err error) metav1.Condition

func UnknownResourcesHealthyCondition added in v0.4.0

func UnknownResourcesHealthyCondition() metav1.Condition

func WorkloadMissingLabelsCondition added in v0.4.0

func WorkloadMissingLabelsCondition() metav1.Condition

Types

type ConditionManager

type ConditionManager interface {
	// Add a condition and associate a polarity with it.
	Add(condition metav1.Condition, positive Polarity)

	// AddPositive Adds a condition with a positive polarity
	AddPositive(condition metav1.Condition)

	// AddNegative Adds a condition with a negative polarity
	AddNegative(condition metav1.Condition)

	// Finalize	returns all conditions
	// not idempotent! subsequent finalizes will keep adding Parent conditions
	// The changed result represents whether the conditions have changed enough to warrant an update to the APIServer
	Finalize() (conditions []metav1.Condition, changed bool)

	// IsSuccessful can be called any time. Start's off true, but an
	// add of an unsuccessful condition (Positive-False or Negative-True)
	// causes this to return false
	IsSuccessful() bool
}

ConditionManager supports collecting condition statuses for your controller It adds a complete top level condition when Finalize is called.

TBD: either error or warn if the same Condition.Type is reused TBD2: should accept an existing []Condition slice to compare against

should only update LastTransitionTime if the other fields have changed

func NewConditionManager

func NewConditionManager(topLevelType string, previousConditions []metav1.Condition) ConditionManager

NewConditionManager returns a ConditionManager with a top level Condition.Type specified in topLevelType

type ConditionManagerBuilder

type ConditionManagerBuilder func(topLevelType string, previousConditions []metav1.Condition) ConditionManager

type Polarity

type Polarity string

Polarity represents how a Status is represented as success.

const Negative Polarity = "Negative"

Negative Polarity means a "False" ConditionStatus is a success

const Positive Polarity = "Positive"

Positive Polarity means a "True" ConditionStatus is a success

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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