Documentation
¶
Index ¶
- func GetNextLogicalJob(timebase metav1.Time, all []v1alpha1.Action, gs lifecycle.ClassifierReader, ...) ([]v1alpha1.Action, time.Time)
- func NewController(mgr ctrl.Manager, logger logr.Logger) error
- func RandomFixedIndexes(start, end, count uint) []uint
- func ValidateDAG(list []v1alpha1.Action, state lifecycle.ClassifierReader) error
- type Controller
- func (r *Controller) ConnectToGrafana(ctx context.Context, cr *v1alpha1.Workflow) error
- func (r *Controller) Finalize(obj client.Object) error
- func (r *Controller) Finalizer() string
- func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *Controller) WatchChaos() predicate.Funcs
- func (r *Controller) WatchClusters() predicate.Funcs
- func (r *Controller) WatchServices() predicate.Funcs
- func (r *Controller) WatchTelemetry() predicate.Funcs
- func (r *Controller) WatchVirtualObjects() predicate.Funcs
- func (r *Controller) WatchVirtualObjectsCreate(e event.CreateEvent) bool
- func (r *Controller) WatchVirtualObjectsDelete(e event.DeleteEvent) bool
- func (r *Controller) WatchVirtualObjectsGeneric(event.GenericEvent) bool
- func (r *Controller) WatchVirtualObjectsUpdate(e event.UpdateEvent) bool
- type SList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNextLogicalJob ¶
func GetNextLogicalJob(timebase metav1.Time, all []v1alpha1.Action, gs lifecycle.ClassifierReader, scheduled map[string]v1alpha1.ConditionalExpr) ([]v1alpha1.Action, time.Time)
GetNextLogicalJob returns a list of jobs that meet the logical and time constraints. That is, either the job has no dependencies, or the dependencies are met.
It is possible for the logical dependencies to be met, but the timeout not yet expired. If at least one action exists, when the workflow is updated it will trigger another reconciliation cycle. However, if there are no actions, the workflow will stop the reconciliation cycle, and we will miss the next timeout. To handle this scenario, we have to requeue the request with the given duration. In this case, the given duration is the nearest expected timeout.
func RandomFixedIndexes ¶ added in v1.0.16
RandomFixedIndexes returns the `count` random indexes between `start` and `end`. [start, end).
func ValidateDAG ¶
func ValidateDAG(list []v1alpha1.Action, state lifecycle.ClassifierReader) error
ValidateDAG validates the execution workflow. 1. Ensures that action names are qualified (since they are used as generators to jobs) 2. Ensures that there are no two actions with the same name. 3. Ensure that dependencies point to a valid action. 4. Ensure that macros point to a valid action.
Types ¶
type Controller ¶
func (*Controller) ConnectToGrafana ¶ added in v1.0.9
func (*Controller) Finalizer ¶
func (r *Controller) Finalizer() string
func (*Controller) WatchChaos ¶
func (r *Controller) WatchChaos() predicate.Funcs
func (*Controller) WatchClusters ¶
func (r *Controller) WatchClusters() predicate.Funcs
func (*Controller) WatchServices ¶
func (r *Controller) WatchServices() predicate.Funcs
func (*Controller) WatchTelemetry ¶
func (r *Controller) WatchTelemetry() predicate.Funcs
func (*Controller) WatchVirtualObjects ¶ added in v1.0.17
func (r *Controller) WatchVirtualObjects() predicate.Funcs
func (*Controller) WatchVirtualObjectsCreate ¶ added in v1.0.17
func (r *Controller) WatchVirtualObjectsCreate(e event.CreateEvent) bool
func (*Controller) WatchVirtualObjectsDelete ¶ added in v1.0.17
func (r *Controller) WatchVirtualObjectsDelete(e event.DeleteEvent) bool
func (*Controller) WatchVirtualObjectsGeneric ¶ added in v1.0.17
func (r *Controller) WatchVirtualObjectsGeneric(event.GenericEvent) bool
func (*Controller) WatchVirtualObjectsUpdate ¶ added in v1.0.17
func (r *Controller) WatchVirtualObjectsUpdate(e event.UpdateEvent) bool