Documentation ¶
Index ¶
- Constants
- func AssertSLA(w *v1alpha1.Workflow) (string, bool)
- func AssertState(expr string, state *BuiltinState) error
- func GetNextLogicalJob(obj metav1.Object, all v1alpha1.ActionList, gs lifecycle.Classifier, ...) (v1alpha1.ActionList, time.Time)
- func InsertSLAAlert(action v1alpha1.Action, w *v1alpha1.Workflow, job metav1.Object) error
- func NewController(mgr ctrl.Manager, logger logr.Logger) error
- func ValidateDAG(list v1alpha1.ActionList) error
- type BuiltinState
- 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
Constants ¶
const ( // JobHasSLA indicate that a job has SLA assertion. Used to deregister the alert once the job has finished. // Used as [JobHasSLA]: [alertID] JobHasSLA = "frisbee.io/sla" // SLAViolationFired indicate that a Grafana alert has been fired. // Used as [SLAViolationFired]: [alertID] SLAViolationFired = "sla.frisbee.io/fire" // SLAViolationInfo include information about the fired Grafana Alert. // Used as [SlaViolationINfo]: [string] SLAViolationInfo = "sla.frisbee.io/info" )
Variables ¶
This section is empty.
Functions ¶
func AssertState ¶
func AssertState(expr string, state *BuiltinState) error
AssertState enforces user-driven decisions as to when the test has passed or has fail. if it has failed, it updates the workflow status and returns true to indicate that the status has been modified.
func GetNextLogicalJob ¶
func GetNextLogicalJob(obj metav1.Object, all v1alpha1.ActionList, gs lifecycle.Classifier, scheduled map[string]metav1.Time) (v1alpha1.ActionList, 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 InsertSLAAlert ¶
func ValidateDAG ¶
func ValidateDAG(list v1alpha1.ActionList) 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 BuiltinState ¶
type BuiltinState struct {
Runtime *lifecycle.Classifier
}
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