Documentation ¶
Index ¶
Constants ¶
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 ¶
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 ¶
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.