controllers

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// StrategyIgnoreLatestFailed is the backup strategy to ignore the latest failed workflowrun
	StrategyIgnoreLatestFailed string = "IgnoreLatestFailedRecord"
	// StrategyBackupFinishedRecord is the backup strategy to backup all finished workflowrun
	StrategyBackupFinishedRecord string = "BackupFinishedRecord"
)

Variables

View Source
var (
	// ReconcileTimeout timeout for controller to reconcile
	ReconcileTimeout = time.Minute * 3
)

Functions

This section is empty.

Types

type Args

type Args struct {
	// ConcurrentReconciles is the concurrent reconcile number of the controller
	ConcurrentReconciles int
	// IgnoreWorkflowWithoutControllerRequirement indicates that workflow controller will not process the workflowrun without 'workflowrun.oam.dev/controller-version-require' annotation.
	IgnoreWorkflowWithoutControllerRequirement bool
	// PackageDiscover discover the packages
	PackageDiscover *packages.PackageDiscover
}

Args args used by controller

type BackupArgs

type BackupArgs struct {
	Persister      backup.PersistWorkflowRecord
	BackupStrategy string
	IgnoreStrategy string
	GroupByLabel   string
	CleanOnBackup  bool
}

BackupArgs is the args for backup

type BackupReconciler

type BackupReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ControllerVersion string
	BackupArgs
	Args
}

BackupReconciler reconciles a WorkflowRun object

func (*BackupReconciler) Reconcile

func (r *BackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles the WorkflowRun object +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns/status,verbs=get;update;patch +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns/finalizers,verbs=update

func (*BackupReconciler) SetupWithManager

func (r *BackupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type WorkflowRunReconciler

type WorkflowRunReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	Recorder          event.Recorder
	ControllerVersion string
	Args
}

WorkflowRunReconciler reconciles a WorkflowRun object

func (*WorkflowRunReconciler) Reconcile

func (r *WorkflowRunReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles the WorkflowRun object +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns/status,verbs=get;update;patch +kubebuilder:rbac:groups=core.oam.dev,resources=workflowruns/finalizers,verbs=update

func (*WorkflowRunReconciler) SetupWithManager

func (r *WorkflowRunReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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