reconciler

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// LabelPause skip reconcile for objects that contains the label and with value "true"
	LabelPause = "controller.core.oam.dev/pause"

	// ValueTrue true value
	ValueTrue = "true"
)

Variables

View Source
var (
	// ReconcileTimeout timeout for controller to reconcile
	ReconcileTimeout = time.Minute * 3
	// ReconcileTerminationGracefulPeriod graceful period for terminating reconcile
	ReconcileTerminationGracefulPeriod = time.Second * 5
)

Functions

func AddFlags

func AddFlags(set *pflag.FlagSet)

AddFlags add flags for controller reconciles

func AddReconcileTimeoutFlags

func AddReconcileTimeoutFlags(set *pflag.FlagSet)

AddReconcileTimeoutFlags add flags for controller reconcile timeout

func BaseContextFrom

func BaseContextFrom(ctx context.Context) (context.Context, bool)

BaseContextFrom extract base context from context

func IsPaused

func IsPaused(o runtime.Object) bool

IsPaused check if the target object should skip reconcile

func NewReconcileContext

func NewReconcileContext(ctx context.Context) (context.Context, context.CancelFunc)

NewReconcileContext create context with default timeout (60s)

func NewReconcileTerminationContext

func NewReconcileTerminationContext(ctx context.Context) (context.Context, context.CancelFunc)

NewReconcileTerminationContext create context with graceful period to timeout for terminating reconciles

func NewTriggerHandler added in v1.9.0

func NewTriggerHandler(eventChannel chan event.GenericEvent) http.Handler

NewTriggerHandler get name and namespace from query params, add it to the event channel

func RegisterTriggerHandler added in v1.9.0

func RegisterTriggerHandler(mgr controllerruntime.Manager, path string, bufferSize int) chan event.GenericEvent

RegisterTriggerHandler register trigger handler to the webhook server of mgr

func SetPause

func SetPause(o runtime.Object, skip bool)

SetPause set if the target object should skip reconcile

func WithBaseContext

func WithBaseContext(ctx context.Context, baseCtx context.Context) context.Context

WithBaseContext wraps context with base context

Types

This section is empty.

Jump to

Keyboard shortcuts

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