controllers

package
v0.0.9-alpha-fork Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJobs

func CreateJobs(ctx context.Context, log logr.Logger, k6 *v1alpha1.K6, r *K6Reconciler) (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.K6, r *K6Reconciler) (ctrl.Result, error)

FinishJobs waits for the pods to finish, performs finishing call for cloud output and moves state to "finished".

func InitializeJobs

func InitializeJobs(ctx context.Context, log logr.Logger, k6 *v1alpha1.K6, r *K6Reconciler) (res ctrl.Result, err error)

InitializeJobs creates jobs that will run initial checks for distributed test if any are necessary

func StartJobs

func StartJobs(ctx context.Context, log logr.Logger, k6 *v1alpha1.K6, r *K6Reconciler) (ctrl.Result, error)

StartJobs in the Ready phase using a curl container

Types

type K6Reconciler

type K6Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

K6Reconciler reconciles a K6 object

func (*K6Reconciler) Reconcile

func (r *K6Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile takes a K6 object and takes the appropriate action in the cluster +kubebuilder:rbac:groups=k6.io,resources=k6s,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=k6.io,resources=k6s/status,verbs=get;update;patch +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list; +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete

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

Jump to

Keyboard shortcuts

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