promotions

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupReconcilerWithManager

func SetupReconcilerWithManager(
	ctx context.Context,
	kargoMgr manager.Manager,
	argocdMgr manager.Manager,
	promoEngine promotion.Engine,
	cfg ReconcilerConfig,
) error

SetupReconcilerWithManager initializes a reconciler for Promotion resources and registers it with the provided Manager.

Types

type ArgoCDAppCreatedOrDeleted added in v1.11.0

type ArgoCDAppCreatedOrDeleted[T any] struct{}

ArgoCDAppCreatedOrDeleted is a predicate that fires when an ArgoCD Application is created or deleted. Either event can change the match set of a label selector, so it enables the Promotion reconciler to react promptly when an Application that a selector-based Promotion targets appears or disappears.

func (ArgoCDAppCreatedOrDeleted[T]) Create added in v1.11.0

func (ArgoCDAppCreatedOrDeleted[T]) Delete added in v1.11.0

func (ArgoCDAppCreatedOrDeleted[T]) Generic added in v1.11.0

func (ArgoCDAppCreatedOrDeleted[T]) Update added in v1.11.0

type ArgoCDAppHealthChanged added in v1.10.0

type ArgoCDAppHealthChanged[T any] struct {
	// contains filtered or unexported fields
}

ArgoCDAppHealthChanged is a predicate that fires when an ArgoCD Application's health status changes (e.g. Progressing → Healthy). This enables the Promotion reconciler to react promptly to health transitions instead of waiting for a polling interval.

func (ArgoCDAppHealthChanged[T]) Create added in v1.10.0

func (ArgoCDAppHealthChanged[T]) Delete added in v1.10.0

func (ArgoCDAppHealthChanged[T]) Generic added in v1.10.0

func (ArgoCDAppHealthChanged[T]) Update added in v1.10.0

type ArgoCDAppLabelsChanged added in v1.11.0

type ArgoCDAppLabelsChanged[T any] struct {
	// contains filtered or unexported fields
}

ArgoCDAppLabelsChanged is a predicate that fires when an ArgoCD Application's labels change. A label selector's match set depends on Application labels, so a relabeling can move an Application into or out of a selector-based Promotion's target set. This enables the Promotion reconciler to react promptly to such membership changes instead of waiting for a polling interval.

func (ArgoCDAppLabelsChanged[T]) Create added in v1.11.0

func (ArgoCDAppLabelsChanged[T]) Delete added in v1.11.0

func (ArgoCDAppLabelsChanged[T]) Generic added in v1.11.0

func (ArgoCDAppLabelsChanged[T]) Update added in v1.11.0

type ArgoCDAppOperationCompleted

type ArgoCDAppOperationCompleted[T any] struct {
	// contains filtered or unexported fields
}

ArgoCDAppOperationCompleted is a predicate that filters out ArgoCD Application Update events where the operation has completed. This is useful for triggering a reconciliation of a Promotion only when an ArgoCD Application operation has finished.

func (ArgoCDAppOperationCompleted[T]) Create

func (ArgoCDAppOperationCompleted[T]) Delete

func (ArgoCDAppOperationCompleted[T]) Generic

func (ArgoCDAppOperationCompleted[T]) Update

type ArgoCDAppReconciledAfterOperation added in v1.10.0

type ArgoCDAppReconciledAfterOperation[T any] struct {
	// contains filtered or unexported fields
}

ArgoCDAppReconciledAfterOperation is a predicate that fires when an Argo CD Application's reconciledAt advances from a stale value (nil or before finishedAt) to a newer value. This is the signal that Argo CD has re-assessed health after a completed operation, making the health status trustworthy again. It enables the Promotion reconciler to react promptly when a hard refresh completes rather than waiting for the next polling interval.

func (ArgoCDAppReconciledAfterOperation[T]) Create added in v1.10.0

func (ArgoCDAppReconciledAfterOperation[T]) Delete added in v1.10.0

func (ArgoCDAppReconciledAfterOperation[T]) Generic added in v1.10.0

func (ArgoCDAppReconciledAfterOperation[T]) Update added in v1.10.0

type ArgoCDAppSyncChanged added in v1.10.0

type ArgoCDAppSyncChanged[T any] struct {
	// contains filtered or unexported fields
}

ArgoCDAppSyncChanged is a predicate that fires when an ArgoCD Application's sync status changes (e.g. OutOfSync → Synced). This enables the Promotion reconciler to react promptly to sync transitions instead of waiting for a polling interval.

func (ArgoCDAppSyncChanged[T]) Create added in v1.10.0

func (ArgoCDAppSyncChanged[T]) Delete added in v1.10.0

func (ArgoCDAppSyncChanged[T]) Generic added in v1.10.0

func (ArgoCDAppSyncChanged[T]) Update added in v1.10.0

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

type PromotionAcknowledgedByStageHandler

type PromotionAcknowledgedByStageHandler[T any] struct {
	// contains filtered or unexported fields
}

PromotionAcknowledgedByStageHandler is an event handler that enqueues a Promotion for reconciliation when it has been acknowledged by the Stage\ it is for. That is the Stage's current Promotion when one changes, and every child of the Stage's current PromotionRequest when that changes: the children of a newly current request -- at most one per Target -- are all admitted at once.

func NewPromotionAcknowledgedByStageHandler added in v1.8.8

func NewPromotionAcknowledgedByStageHandler[T any](
	kargoClient client.Client,
	shardPredicate controller.ResponsibleFor[kargoapi.Stage],
) *PromotionAcknowledgedByStageHandler[T]

NewPromotionAcknowledgedByStageHandler creates a new PromotionAcknowledgedByStageHandler with the given client and shard predicate.

func (*PromotionAcknowledgedByStageHandler[T]) Create

Create implements TypedEventHandler.

func (*PromotionAcknowledgedByStageHandler[T]) Delete

Delete implements TypedEventHandler.

func (*PromotionAcknowledgedByStageHandler[T]) Generic

Generic implements TypedEventHandler.

func (*PromotionAcknowledgedByStageHandler[T]) Update

Update implements TypedEventHandler.

type ReconcilerConfig

type ReconcilerConfig struct {
	IsDefaultController     bool   `envconfig:"IS_DEFAULT_CONTROLLER"`
	ShardName               string `envconfig:"SHARD_NAME"`
	APIServerBaseURL        string `envconfig:"API_SERVER_BASE_URL"`
	MaxConcurrentReconciles int    `envconfig:"MAX_CONCURRENT_PROMOTION_RECONCILES" default:"4"`
}

ReconcilerConfig represents configuration for the promotion reconciler.

func ReconcilerConfigFromEnv

func ReconcilerConfigFromEnv() ReconcilerConfig

func (ReconcilerConfig) Name

func (c ReconcilerConfig) Name() string

type UpdatedArgoCDAppHandler

type UpdatedArgoCDAppHandler[T any] struct {
	// contains filtered or unexported fields
}

UpdatedArgoCDAppHandler is an event handler that enqueues Promotions for reconciliation when an associated ArgoCD Application is updated.

func (*UpdatedArgoCDAppHandler[T]) Create

Create implements TypedEventHandler.

func (*UpdatedArgoCDAppHandler[T]) Delete

Delete implements TypedEventHandler.

func (*UpdatedArgoCDAppHandler[T]) Generic

Generic implements TypedEventHandler.

func (*UpdatedArgoCDAppHandler[T]) Update

Update implements TypedEventHandler.

Jump to

Keyboard shortcuts

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