Documentation ¶
Index ¶
- Constants
- func NewAlertingProxy(ctx context.Context, r *Controller) error
- func NewController(mgr ctrl.Manager, logger logr.Logger) error
- type Controller
- func (r *Controller) Finalize(obj client.Object) error
- func (r *Controller) Finalizer() string
- func (r *Controller) HasFailed(ctx context.Context, scenario *v1alpha1.Scenario) error
- func (r *Controller) HasSucceed(ctx context.Context, scenario *v1alpha1.Scenario) error
- func (r *Controller) Initialize(ctx context.Context, scenario *v1alpha1.Scenario) error
- func (r *Controller) ListTelemetryAgents(ctx context.Context, scenario *v1alpha1.Scenario) ([]string, error)
- func (r *Controller) NextJobs(scenario *v1alpha1.Scenario) (runNext []v1alpha1.Action, nextCycle time.Time, err error)
- func (r *Controller) PopulateView(ctx context.Context, req types.NamespacedName) error
- func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *Controller) RunAction(ctx context.Context, scenario *v1alpha1.Scenario, action v1alpha1.Action) error
- func (r *Controller) RunActions(ctx context.Context, scenario *v1alpha1.Scenario, ...) error
- func (r *Controller) StartTelemetry(ctx context.Context, scenario *v1alpha1.Scenario) error
- func (r *Controller) StopTelemetry(scenario *v1alpha1.Scenario)
Constants ¶
const (
OverrideAdvertisedHost = "FRISBEE_ADVERTISED_HOST"
)
Variables ¶
This section is empty.
Functions ¶
func NewAlertingProxy ¶ added in v1.0.41
func NewAlertingProxy(ctx context.Context, r *Controller) error
NewAlertingProxy creates a Webhook for listening for events from Grafana.
Types ¶
type Controller ¶
func (*Controller) Finalizer ¶
func (r *Controller) Finalizer() string
func (*Controller) HasSucceed ¶ added in v1.0.24
func (*Controller) Initialize ¶
func (*Controller) ListTelemetryAgents ¶ added in v1.0.24
func (r *Controller) ListTelemetryAgents(ctx context.Context, scenario *v1alpha1.Scenario) ([]string, error)
ListTelemetryAgents iterates the referenced services (directly via Service or indirectly via Cluster) and list all telemetry dashboards that need to be imported.
func (*Controller) NextJobs ¶ added in v1.0.24
func (r *Controller) NextJobs(scenario *v1alpha1.Scenario) (runNext []v1alpha1.Action, nextCycle time.Time, err error)
NextJobs 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 call 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 (*Controller) PopulateView ¶ added in v1.0.24
func (r *Controller) PopulateView(ctx context.Context, req types.NamespacedName) error
PopulateView list all child objects in this namespace that belong to this scenario, and split them into active, successful, and failed jobs.
func (*Controller) RunActions ¶
func (*Controller) StartTelemetry ¶
func (*Controller) StopTelemetry ¶ added in v1.0.24
func (r *Controller) StopTelemetry(scenario *v1alpha1.Scenario)
StopTelemetry removes the annotations from the target object, removes the Alert from Grafana, and deleted the client for the specific scenario.