kargo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPromotion

func NewPromotion(
	ctx context.Context,
	stage kargoapi.Stage,
	freight string,
) kargoapi.Promotion

NewPromotion returns a new Promotion from a given stage and freight with our naming convention.

Types

type PromoPhaseChanged added in v0.7.0

type PromoPhaseChanged[T any] struct {
	predicate.Funcs
	// contains filtered or unexported fields
}

PromoPhaseChanged is a predicate that returns true if the phase of a promotion has changed. It can be used to trigger the reconciliation of an associated object when the phase of a Promotion changes. A concrete example is to trigger the reconciliation of a Stage when the phase of a Promotion for that Stage changes, so that the Stage can update the last Promotion reference in its status.

func NewPromoPhaseChangedPredicate added in v0.7.0

func NewPromoPhaseChangedPredicate(logger *logging.Logger) PromoPhaseChanged[*kargoapi.Promotion]

func (PromoPhaseChanged[T]) Create added in v0.7.0

func (p PromoPhaseChanged[T]) Create(event.TypedCreateEvent[T]) bool

func (PromoPhaseChanged[T]) Delete added in v0.7.0

func (p PromoPhaseChanged[T]) Delete(e event.TypedDeleteEvent[T]) bool

func (PromoPhaseChanged[T]) Generic added in v0.7.0

func (p PromoPhaseChanged[T]) Generic(event.TypedGenericEvent[T]) bool

func (PromoPhaseChanged[T]) Update added in v0.7.0

func (p PromoPhaseChanged[T]) Update(e event.TypedUpdateEvent[T]) bool

type PromoWentTerminal added in v0.2.0

type PromoWentTerminal[T any] struct {
	predicate.Funcs
	// contains filtered or unexported fields
}

PromoWentTerminal is a predicate that returns true if a promotion went terminal. Used by stage reconciler to enqueue a stage when it's associated promo is complete. Also used by promo reconciler to enqueue the next highest priority promotion.

func NewPromoWentTerminalPredicate added in v0.2.0

func NewPromoWentTerminalPredicate(logger *logging.Logger) PromoWentTerminal[*kargoapi.Promotion]

func (PromoWentTerminal[T]) Create added in v0.2.0

func (p PromoWentTerminal[T]) Create(event.TypedCreateEvent[T]) bool

func (PromoWentTerminal[T]) Delete added in v0.2.0

func (p PromoWentTerminal[T]) Delete(e event.TypedDeleteEvent[T]) bool

func (PromoWentTerminal[T]) Generic added in v0.2.0

func (p PromoWentTerminal[T]) Generic(event.TypedGenericEvent[T]) bool

func (PromoWentTerminal[T]) Update added in v0.2.0

func (p PromoWentTerminal[T]) Update(e event.TypedUpdateEvent[T]) bool

Update implements default TypedUpdateEvent filter for checking if a promotion went terminal

type PromotionAbortRequested added in v1.0.0

type PromotionAbortRequested struct {
	predicate.Funcs
}

PromotionAbortRequested is a predicate that returns true if the abort annotation has been set on a resource, or the action of the request has changed compared to the previous state.

func (PromotionAbortRequested) Update added in v1.0.0

Update returns true if the abort annotation has been set on the new object, or if the action of the request has changed compared to the old object.

type RefreshRequested added in v0.6.0

type RefreshRequested struct {
	predicate.Funcs
}

RefreshRequested is a predicate that returns true if the refresh annotation has been set on a resource, or the value of the annotation has changed compared to the previous state.

func (RefreshRequested) Update added in v0.6.0

func (p RefreshRequested) Update(e event.UpdateEvent) bool

Update returns true if the refresh annotation has been set on the new object, or if the value of the annotation has changed compared to the old object.

type ReverifyRequested added in v0.6.0

type ReverifyRequested struct {
	predicate.Funcs
}

ReverifyRequested is a predicate that returns true if the reverify annotation has been set on a resource, or the ID of the request has changed compared to the previous state.

func (ReverifyRequested) Update added in v0.6.0

Update returns true if the reverify annotation has been set on the new object, or if the ID of the request has changed compared to the old object.

type VerificationAbortRequested added in v1.0.0

type VerificationAbortRequested struct {
	predicate.Funcs
}

VerificationAbortRequested is a predicate that returns true if the abort annotation has been set on a resource, or the ID of the request has changed compared to the previous state.

func (VerificationAbortRequested) Update added in v1.0.0

Update returns true if the abort annotation has been set on the new object, or if the ID of the request has changed compared to the old object.

Jump to

Keyboard shortcuts

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