continuousreconcile

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ContinuousReconcileActiveAnnotation = "continuousreconcile.extensions.landscaper.gardener.cloud/active"

ContinuousReconcileActiveAnnotation can be used to deactivate continuous reconciliation on a deploy item without changing its spec. Setting it to "false" will suppress continuous reconciliation, even if it is configured for the deploy item otherwise. Setting it to any other value has no effect.

Variables

This section is empty.

Functions

func ContinuousReconcileExtension

func ContinuousReconcileExtension(nextReconcile func(context.Context, time.Time, *lsv1alpha1.DeployItem) (*time.Time, error)) extension.ReconcileExtensionHook

ContinuousReconcileExtension returns an extension hook function which can handle continuous reconciliation. It is meant to be used as a ShouldReconcile hook and might yield unexpected results if used with another hook handle. The function which it takes as an argument is expected to take a time and return the time when the deploy item should be scheduled for the next automatic reconciliation.

It should return nil if continuous reconciliation is not configured for the deploy item.

The returned function will panic if the provided deploy item is nil.

func ContinuousReconcileExtensionSetup

func ContinuousReconcileExtensionSetup(nextReconcile func(context.Context, time.Time, *lsv1alpha1.DeployItem) (*time.Time, error)) extension.ReconcileExtensionHookSetup

ContinuousReconcileExtensionSetup is a wrapper for ContinuousReconcileExtension. The return value also contains the ShouldReconcile hook type.

func Schedule

func Schedule(crs *cr.ContinuousReconcileSpec) (cron.Schedule, error)

Schedule returns a cron schedule based on the specification. If both Cron and Every are specified (which should be prevented by validation), Cron takes precedence. If neither is specified, an error is returned (this should also be prevented by validation).

Types

This section is empty.

Jump to

Keyboard shortcuts

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