Documentation
¶
Index ¶
- func SetupReconcilerWithManager(ctx context.Context, kargoMgr manager.Manager, argocdMgr manager.Manager, ...) error
- type ArgoCDAppCreatedOrDeleted
- func (p ArgoCDAppCreatedOrDeleted[T]) Create(event.TypedCreateEvent[T]) bool
- func (p ArgoCDAppCreatedOrDeleted[T]) Delete(event.TypedDeleteEvent[T]) bool
- func (p ArgoCDAppCreatedOrDeleted[T]) Generic(event.TypedGenericEvent[T]) bool
- func (p ArgoCDAppCreatedOrDeleted[T]) Update(event.TypedUpdateEvent[T]) bool
- type ArgoCDAppHealthChanged
- type ArgoCDAppLabelsChanged
- type ArgoCDAppOperationCompleted
- func (p ArgoCDAppOperationCompleted[T]) Create(event.TypedCreateEvent[T]) bool
- func (p ArgoCDAppOperationCompleted[T]) Delete(event.TypedDeleteEvent[T]) bool
- func (p ArgoCDAppOperationCompleted[T]) Generic(event.TypedGenericEvent[T]) bool
- func (p ArgoCDAppOperationCompleted[T]) Update(e event.TypedUpdateEvent[T]) bool
- type ArgoCDAppReconciledAfterOperation
- func (p ArgoCDAppReconciledAfterOperation[T]) Create(event.TypedCreateEvent[T]) bool
- func (p ArgoCDAppReconciledAfterOperation[T]) Delete(event.TypedDeleteEvent[T]) bool
- func (p ArgoCDAppReconciledAfterOperation[T]) Generic(event.TypedGenericEvent[T]) bool
- func (p ArgoCDAppReconciledAfterOperation[T]) Update(e event.TypedUpdateEvent[T]) bool
- type ArgoCDAppSyncChanged
- type PromotionAcknowledgedByStageHandler
- func (p *PromotionAcknowledgedByStageHandler[T]) Create(context.Context, event.TypedCreateEvent[T], ...)
- func (p *PromotionAcknowledgedByStageHandler[T]) Delete(context.Context, event.TypedDeleteEvent[T], ...)
- func (p *PromotionAcknowledgedByStageHandler[T]) Generic(context.Context, event.TypedGenericEvent[T], ...)
- func (p *PromotionAcknowledgedByStageHandler[T]) Update(ctx context.Context, e event.TypedUpdateEvent[T], ...)
- type ReconcilerConfig
- type UpdatedArgoCDAppHandler
- func (u *UpdatedArgoCDAppHandler[T]) Create(ctx context.Context, e event.TypedCreateEvent[T], ...)
- func (u *UpdatedArgoCDAppHandler[T]) Delete(ctx context.Context, e event.TypedDeleteEvent[T], ...)
- func (u *UpdatedArgoCDAppHandler[T]) Generic(context.Context, event.TypedGenericEvent[T], ...)
- func (u *UpdatedArgoCDAppHandler[T]) Update(ctx context.Context, e event.TypedUpdateEvent[T], ...)
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 (p ArgoCDAppCreatedOrDeleted[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppCreatedOrDeleted[T]) Delete ¶ added in v1.11.0
func (p ArgoCDAppCreatedOrDeleted[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppCreatedOrDeleted[T]) Generic ¶ added in v1.11.0
func (p ArgoCDAppCreatedOrDeleted[T]) Generic(event.TypedGenericEvent[T]) bool
func (ArgoCDAppCreatedOrDeleted[T]) Update ¶ added in v1.11.0
func (p ArgoCDAppCreatedOrDeleted[T]) Update(event.TypedUpdateEvent[T]) bool
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 (p ArgoCDAppHealthChanged[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppHealthChanged[T]) Delete ¶ added in v1.10.0
func (p ArgoCDAppHealthChanged[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppHealthChanged[T]) Generic ¶ added in v1.10.0
func (p ArgoCDAppHealthChanged[T]) Generic(event.TypedGenericEvent[T]) bool
func (ArgoCDAppHealthChanged[T]) Update ¶ added in v1.10.0
func (p ArgoCDAppHealthChanged[T]) Update(e event.TypedUpdateEvent[T]) bool
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 (p ArgoCDAppLabelsChanged[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppLabelsChanged[T]) Delete ¶ added in v1.11.0
func (p ArgoCDAppLabelsChanged[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppLabelsChanged[T]) Generic ¶ added in v1.11.0
func (p ArgoCDAppLabelsChanged[T]) Generic(event.TypedGenericEvent[T]) bool
func (ArgoCDAppLabelsChanged[T]) Update ¶ added in v1.11.0
func (p ArgoCDAppLabelsChanged[T]) Update(e event.TypedUpdateEvent[T]) bool
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 (p ArgoCDAppOperationCompleted[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppOperationCompleted[T]) Delete ¶
func (p ArgoCDAppOperationCompleted[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppOperationCompleted[T]) Generic ¶
func (p ArgoCDAppOperationCompleted[T]) Generic(event.TypedGenericEvent[T]) bool
func (ArgoCDAppOperationCompleted[T]) Update ¶
func (p ArgoCDAppOperationCompleted[T]) Update(e event.TypedUpdateEvent[T]) bool
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 (p ArgoCDAppReconciledAfterOperation[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppReconciledAfterOperation[T]) Delete ¶ added in v1.10.0
func (p ArgoCDAppReconciledAfterOperation[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppReconciledAfterOperation[T]) Generic ¶ added in v1.10.0
func (p ArgoCDAppReconciledAfterOperation[T]) Generic(event.TypedGenericEvent[T]) bool
func (ArgoCDAppReconciledAfterOperation[T]) Update ¶ added in v1.10.0
func (p ArgoCDAppReconciledAfterOperation[T]) Update(e event.TypedUpdateEvent[T]) bool
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 (p ArgoCDAppSyncChanged[T]) Create(event.TypedCreateEvent[T]) bool
func (ArgoCDAppSyncChanged[T]) Delete ¶ added in v1.10.0
func (p ArgoCDAppSyncChanged[T]) Delete(event.TypedDeleteEvent[T]) bool
func (ArgoCDAppSyncChanged[T]) Generic ¶ added in v1.10.0
func (p ArgoCDAppSyncChanged[T]) Generic(event.TypedGenericEvent[T]) bool
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 ¶
func (p *PromotionAcknowledgedByStageHandler[T]) Create( context.Context, event.TypedCreateEvent[T], workqueue.TypedRateLimitingInterface[reconcile.Request], )
Create implements TypedEventHandler.
func (*PromotionAcknowledgedByStageHandler[T]) Delete ¶
func (p *PromotionAcknowledgedByStageHandler[T]) Delete( context.Context, event.TypedDeleteEvent[T], workqueue.TypedRateLimitingInterface[reconcile.Request], )
Delete implements TypedEventHandler.
func (*PromotionAcknowledgedByStageHandler[T]) Generic ¶
func (p *PromotionAcknowledgedByStageHandler[T]) Generic( context.Context, event.TypedGenericEvent[T], workqueue.TypedRateLimitingInterface[reconcile.Request], )
Generic implements TypedEventHandler.
func (*PromotionAcknowledgedByStageHandler[T]) Update ¶
func (p *PromotionAcknowledgedByStageHandler[T]) Update( ctx context.Context, e event.TypedUpdateEvent[T], wq workqueue.TypedRateLimitingInterface[reconcile.Request], )
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 ¶
func (u *UpdatedArgoCDAppHandler[T]) Create( ctx context.Context, e event.TypedCreateEvent[T], wq workqueue.TypedRateLimitingInterface[reconcile.Request], )
Create implements TypedEventHandler.
func (*UpdatedArgoCDAppHandler[T]) Delete ¶
func (u *UpdatedArgoCDAppHandler[T]) Delete( ctx context.Context, e event.TypedDeleteEvent[T], wq workqueue.TypedRateLimitingInterface[reconcile.Request], )
Delete implements TypedEventHandler.
func (*UpdatedArgoCDAppHandler[T]) Generic ¶
func (u *UpdatedArgoCDAppHandler[T]) Generic( context.Context, event.TypedGenericEvent[T], workqueue.TypedRateLimitingInterface[reconcile.Request], )
Generic implements TypedEventHandler.
func (*UpdatedArgoCDAppHandler[T]) Update ¶
func (u *UpdatedArgoCDAppHandler[T]) Update( ctx context.Context, e event.TypedUpdateEvent[T], wq workqueue.TypedRateLimitingInterface[reconcile.Request], )
Update implements TypedEventHandler.