Documentation ¶
Index ¶
- func CreateJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (ctrl.Result, error)
- func FinishJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (allFinished bool)
- func InitializeJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (res ctrl.Result, err error)
- func KillJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (allDeleted bool, err error)
- func RunValidations(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (res ctrl.Result, ready bool, err error)
- func SetupCloudTest(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (res ctrl.Result, err error)
- func StartJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (res ctrl.Result, err error)
- func StopJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (res ctrl.Result, err error)
- func StoppedJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, ...) (allStopped bool)
- type K6Reconciler
- type PrivateLoadZoneReconciler
- func (r *PrivateLoadZoneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PrivateLoadZoneReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PrivateLoadZoneReconciler) UpdateStatus(ctx context.Context, plz *v1alpha1.PrivateLoadZone, log logr.Logger) (updateHappened bool, err error)
- type TestRunReconciler
- func (r *TestRunReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TestRunReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *TestRunReconciler) ShouldAbort(ctx context.Context, k6 v1alpha1.TestRunI, log logr.Logger) bool
- func (r *TestRunReconciler) UpdateStatus(ctx context.Context, k6 v1alpha1.TestRunI, log logr.Logger) (updateHappened bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJobs ¶
func CreateJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (ctrl.Result, error)
CreateJobs creates jobs that will spawn k6 pods for distributed test
func FinishJobs ¶
func FinishJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (allFinished bool)
FinishJobs checks if the runners pods have finished execution.
func InitializeJobs ¶
func InitializeJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (res ctrl.Result, err error)
InitializeJobs creates jobs that will run initial checks for distributed test if any are necessary
func KillJobs ¶ added in v0.0.10
func KillJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (allDeleted bool, err error)
KillJobs retrieves all runner jobs and attempts to delete them with propagation policy so that corresponding pods are deleted as well. On failure, error is returned. On success, error is nil and allDeleted shows if all retrieved jobs were deleted.
func RunValidations ¶ added in v0.0.9
func SetupCloudTest ¶ added in v0.0.9
func SetupCloudTest(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (res ctrl.Result, err error)
SetupCloudTest inspects the output of initializer and creates a new test run. It is meant to be used only in cloud output mode.
func StartJobs ¶
func StartJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (res ctrl.Result, err error)
StartJobs in the Ready phase using a curl container
func StopJobs ¶ added in v0.0.10
func StopJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (res ctrl.Result, err error)
StopJobs in the Ready phase using a curl container It assumes that Services of the runners are already up and test is being executed.
func StoppedJobs ¶ added in v0.0.10
func StoppedJobs(ctx context.Context, log logr.Logger, k6 v1alpha1.TestRunI, r *TestRunReconciler) (allStopped bool)
StoppedJobs checks if the runners pods have stopped execution.
Types ¶
type K6Reconciler ¶
type K6Reconciler struct {
// contains filtered or unexported fields
}
func NewK6Reconciler ¶ added in v0.0.11
func NewK6Reconciler(t *TestRunReconciler) *K6Reconciler
func (*K6Reconciler) SetupWithManager ¶
func (r *K6Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up a managed controller that will reconcile all events for the K6 CRD
type PrivateLoadZoneReconciler ¶ added in v0.0.10
type PrivateLoadZoneReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme // contains filtered or unexported fields }
PrivateLoadZoneReconciler reconciles a PrivateLoadZone object
func (*PrivateLoadZoneReconciler) Reconcile ¶ added in v0.0.10
func (r *PrivateLoadZoneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile takes a PrivateLoadZone object and takes the appropriate action in the cluster
func (*PrivateLoadZoneReconciler) SetupWithManager ¶ added in v0.0.10
func (r *PrivateLoadZoneReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*PrivateLoadZoneReconciler) UpdateStatus ¶ added in v0.0.10
func (r *PrivateLoadZoneReconciler) UpdateStatus( ctx context.Context, plz *v1alpha1.PrivateLoadZone, log logr.Logger) (updateHappened bool, err error)
UpdateStatus is now using similar logic to TestRunReconciler: see if it can / should be refactored.
type TestRunReconciler ¶ added in v0.0.11
type TestRunReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme // contains filtered or unexported fields }
TestRunReconciler reconciles a K6 object
func (*TestRunReconciler) SetupWithManager ¶ added in v0.0.11
func (r *TestRunReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up a managed controller that will reconcile all events for the K6 CRD
func (*TestRunReconciler) ShouldAbort ¶ added in v0.0.11
func (r *TestRunReconciler) ShouldAbort(ctx context.Context, k6 v1alpha1.TestRunI, log logr.Logger) bool
ShouldAbort retrieves the status of test run from the Cloud and whether it should cause a forced stop. It is meant to be used only by PLZ test runs.