workflow

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNextLogicalJob

func GetNextLogicalJob(obj metav1.Object, all []v1alpha1.Action, gs lifecycle.ClassifierReader, scheduled map[string]metav1.Time) ([]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 NewController

func NewController(mgr ctrl.Manager, logger logr.Logger) error

func RandomFixedIndexes added in v1.0.16

func RandomFixedIndexes(start, end, count uint) []uint

RandomFixedIndexes returns the `count` random indexes between `start` and `end`. [start, end).

func ValidateDAG

func ValidateDAG(list []v1alpha1.Action) 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

type Controller struct {
	ctrl.Manager
	logr.Logger
	// contains filtered or unexported fields
}

func (*Controller) ConnectToGrafana added in v1.0.9

func (r *Controller) ConnectToGrafana(ctx context.Context, cr *v1alpha1.Workflow) error

func (*Controller) Finalize

func (r *Controller) Finalize(obj client.Object) error

func (*Controller) Finalizer

func (r *Controller) Finalizer() string

func (*Controller) Reconcile

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

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

type SList added in v1.0.16

type SList []*v1alpha1.Service

SList is a service list

func Select added in v1.0.16

func Select(ctx context.Context, s *Controller, nm string, ss *v1alpha1.ServiceSelector) (SList, error)

func (SList) GetNames added in v1.0.16

func (in SList) GetNames() []string

func (SList) ToString added in v1.0.16

func (in SList) ToString() string

Jump to

Keyboard shortcuts

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