controller

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: GPL-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATING   = "Creating"
	GENERATING = "Generating"
	RUNNING    = "Running"
	FAILED     = "Failed"
	SUCCESS    = "Success"
	UNKNOWN    = "Unknown"
)
View Source
const (
	ExperimentPending                 string = "Pending"                 // experiment object has been created but no pipeline has been selected/attached
	ExperimentInitializing            string = "Initializing"            // experiment is initializing after pipeline is selected
	ExperimentWaitingForPipelineReady string = "WaitingForPipelineReady" // experiment is waiting for pipeline to pass health checks
	ExperimentReady                   string = "Ready"                   // experiment is ready to be run on the selected pipeline
	ExperimentRunning                 string = "Running"                 // experiment is running
	ExperimentFinished                string = "Finished"                // experiment has finished running; i.e. the k6 load generator has finished sending data
)
View Source
const (
	ResourcePending  = "Pending"   // Resource created or updated, and have no replica numbers
	ResourceNotReady = "Not Ready" // Resource pending, not all replicas are ready
	ResourceReady    = "Ready"     // Resource ready, all replicas are ready
)

Enums of resource status

View Source
const (
	SimulationPending  string = "Pending"  // Simulation object has been created
	SimulationRunning  string = "Running"  // Simulation is running
	SimulationFinished string = "Finished" // Simulation has finished running;
	SimulationFailed   string = "Failed"
)

Variables

This section is empty.

Functions

func GetLoadPatternNamespace

func GetLoadPatternNamespace(exp *windtunnelv1alpha1.Experiment, ref *corev1.ObjectReference) string

Types

type CostExporterReconciler

type CostExporterReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

CostExporterReconciler reconciles a CostExporter object

func (*CostExporterReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*CostExporterReconciler) SetupWithManager

func (r *CostExporterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DataSetReconciler

type DataSetReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	CGClient *clientgo.Clientset
}

DataSetReconciler reconciles a DataSet object

func (*DataSetReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*DataSetReconciler) SetupWithManager

func (r *DataSetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ExperimentReconciler

type ExperimentReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ExperimentReconciler reconciles a Experiment object

func (*ExperimentReconciler) CheckFinished

Check if the test run is finished

func (*ExperimentReconciler) CopyConfigMap added in v1.2.0

func (*ExperimentReconciler) CreateConfigMap

func (*ExperimentReconciler) CreateConfigMapWithDataSet

func (*ExperimentReconciler) CreateK6

func (r *ExperimentReconciler) CreateK6(ctx context.Context, exp *windtunnelv1alpha1.Experiment, endpointName string) error

func (*ExperimentReconciler) CreateK6WithDataSet

func (r *ExperimentReconciler) CreateK6WithDataSet(ctx context.Context, exp *windtunnelv1alpha1.Experiment, dataset *windtunnelv1alpha1.DataSet, endpointName string) error

func (*ExperimentReconciler) CreateTestRun

func (*ExperimentReconciler) CreateTestRunWithDataSet

func (r *ExperimentReconciler) CreateTestRunWithDataSet(ctx context.Context, exp *windtunnelv1alpha1.Experiment, endpointSpec *windtunnelv1alpha1.EndpointSpec, endpoint *windtunnelv1alpha1.Endpoint) error

func (*ExperimentReconciler) CreateTestRunWithOutDataSet

func (r *ExperimentReconciler) CreateTestRunWithOutDataSet(ctx context.Context, exp *windtunnelv1alpha1.Experiment, endpointSpec *windtunnelv1alpha1.EndpointSpec, endpoint *windtunnelv1alpha1.Endpoint) error

func (*ExperimentReconciler) InitializeExp

func (*ExperimentReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*ExperimentReconciler) SetDuration

func (*ExperimentReconciler) SetupWithManager

func (r *ExperimentReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ExperimentReconciler) UpdatePipeline

func (r *ExperimentReconciler) UpdatePipeline(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline, expRef corev1.ObjectReference) error

type ExperimentTags

type ExperimentTags struct {
	Name string `json:"name,omitempty"`
	Tags []Tag  `json:"tags,omitempty"`
}

type PipelineReconciler

type PipelineReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

PipelineReconciler reconciles a Pipeline object

func (*PipelineReconciler) CreateService

func (r *PipelineReconciler) CreateService(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline) error

Create externalName service and endpoint for pipeline endpoints and the metrics endpoint.

func (*PipelineReconciler) HealthCheck

func (r *PipelineReconciler) HealthCheck(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline) error

func (*PipelineReconciler) Initialize

func (r *PipelineReconciler) Initialize(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline) error

func (*PipelineReconciler) InitializeExp

func (r *PipelineReconciler) InitializeExp(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline) error

func (*PipelineReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*PipelineReconciler) SetupWithManager

func (r *PipelineReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PipelineReconciler) UpdateStatus

func (r *PipelineReconciler) UpdateStatus(ctx context.Context, pipeline *windtunnelv1alpha1.Pipeline, pipelineState string, statusCheck string) error

type PlantDCoreReconciler

type PlantDCoreReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

PlantDCoreReconciler reconciles a PlantDCore object

func (*PlantDCoreReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the PlantDCore object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here:ec - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*PlantDCoreReconciler) SetupWithManager

func (r *PlantDCoreReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ReconcilerResult added in v1.3.0

type ReconcilerResult int8

ReconcilerResult is the type of reconciler result

const (
	ReconcilerFailed  ReconcilerResult = iota // Reconciliation failed
	ReconcilerOK                              // No operation required
	ReconcilerCreated                         // Resource created
	ReconcilerUpdated                         // Resource updated
)

Enums of reconciliation results

type ScenarioReconciler added in v1.6.0

type ScenarioReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ScenarioReconciler reconciles a Scenario object

func (*ScenarioReconciler) Reconcile added in v1.6.0

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Scenario object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile

func (*ScenarioReconciler) SetupWithManager added in v1.6.0

func (r *ScenarioReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type SimulationReconciler added in v1.5.0

type SimulationReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

SimulationReconciler reconciles a Simulation object

func (*SimulationReconciler) Reconcile added in v1.5.0

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. Modify the Reconcile function to compare the state specified by the Simulation object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile

func (*SimulationReconciler) SetupWithManager added in v1.5.0

func (r *SimulationReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Tag

type Tag struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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