controllers

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 26 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
}

Args args used by controller

type BackupArgs

type BackupArgs struct {
	PersistType    string
	BackupStrategy string
	IgnoreStrategy string
	GroupByLabel   string
	CleanOnBackup  bool
	PersistConfig  map[string][]byte
}

BackupArgs is the args for backup

type BackupReconciler

type BackupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	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
	PackageDiscover *packages.PackageDiscover
	Recorder        event.Recorder
	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