v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the gatling-operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=gatling-operator.tech.zozo.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "gatling-operator.tech.zozo.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type CloudStorageSpec

type CloudStorageSpec struct {
	// Provider specifies the cloud provider that will be used.
	// Supported providers: aws
	// +kubebuilder:validation:Optional
	Provider string `json:"provider"`

	// Bucket Name
	// +kubebuilder:validation:Required
	Bucket string `json:"bucket"`

	// Region
	// +kubebuilder:validation:Optional
	Region string `json:"region,omitempty"`

	// Environment variables used for connecting to the cloud providers.
	// +kubebuilder:validation:Optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

func (*CloudStorageSpec) DeepCopy

func (in *CloudStorageSpec) DeepCopy() *CloudStorageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudStorageSpec.

func (*CloudStorageSpec) DeepCopyInto

func (in *CloudStorageSpec) DeepCopyInto(out *CloudStorageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Gatling

type Gatling struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GatlingSpec   `json:"spec,omitempty"`
	Status GatlingStatus `json:"status,omitempty"`
}

Gatling is the Schema for the gatlings API

func (*Gatling) DeepCopy

func (in *Gatling) DeepCopy() *Gatling

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gatling.

func (*Gatling) DeepCopyInto

func (in *Gatling) DeepCopyInto(out *Gatling)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Gatling) DeepCopyObject

func (in *Gatling) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GatlingList

type GatlingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Gatling `json:"items"`
}

GatlingList contains a list of Gatling

func (*GatlingList) DeepCopy

func (in *GatlingList) DeepCopy() *GatlingList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatlingList.

func (*GatlingList) DeepCopyInto

func (in *GatlingList) DeepCopyInto(out *GatlingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GatlingList) DeepCopyObject

func (in *GatlingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GatlingSpec

type GatlingSpec struct {

	// The flag of generating gatling report
	// +kubebuilder:default=false
	// +kubebuilder:validation:Optional
	GenerateReport bool `json:"generateReport,omitempty"`

	// The flag of notifying gatling report
	// +kubebuilder:default=false
	// +kubebuilder:validation:Optional
	NotifyReport bool `json:"notifyReport,omitempty"`

	// The flag of cleanup gatling resources after the job done
	// +kubebuilder:default=false
	// +kubebuilder:validation:Optional
	CleanupAfterJobDone bool `json:"cleanupAfterJobDone,omitempty"`

	// Pod extra specification
	// +kubebuilder:validation:Optional
	PodSpec PodSpec `json:"podSpec,omitempty"`

	// Cloud Storage Provider
	// +kubebuilder:validation:Optional
	CloudStorageSpec CloudStorageSpec `json:"cloudStorageSpec,omitempty"`

	// Notification Service specification
	// +kubebuilder:validation:Optional
	NotificationServiceSpec NotificationServiceSpec `json:"notificationServiceSpec,omitempty"`

	// Test Scenario specification
	// +kubebuilder:validation:Required
	TestScenarioSpec TestScenarioSpec `json:"testScenarioSpec"`
}

GatlingSpec defines the desired state of Gatling

func (*GatlingSpec) DeepCopy

func (in *GatlingSpec) DeepCopy() *GatlingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatlingSpec.

func (*GatlingSpec) DeepCopyInto

func (in *GatlingSpec) DeepCopyInto(out *GatlingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GatlingStatus

type GatlingStatus struct {

	// Active is list of currently running jobs
	// The number of actively running pods for the gatling job
	// +optional
	Active int32 `json:"active,omitempty"`

	// The number of pods which reached phase Succeeded for the gatling job
	// +optional
	Succeeded int32 `json:"succeeded,omitempty"`

	// The number of pods which reached phase Failed for the gatling job
	// +optional
	Failed int32 `json:"failed,omitempty"`

	// Runner job name
	// +optional
	RunnerJobName string `json:"runnerJobName,omitempty"`

	// Runner start time (UnixTime epoc)
	// +optional
	RunnerStartTime int32 `json:"runnerStartTime,omitempty"`

	// Is runner job completed (default false)
	// +optional
	RunnerCompleted bool `json:"runnerCompleted,omitempty"`

	// Reporter job name
	// +optional
	ReporterJobName string `json:"reporterJobName,omitempty"`

	// Reporter start time (UnixTime epoc)
	// +optional
	ReporterStartTime int32 `json:"reporterStartTime,omitempty"`

	// Is report generation completed (default false)
	// +optional
	ReportCompleted bool `json:"reportCompleted,omitempty"`

	// Report Storage Path
	// +optional
	ReportStoragePath string `json:"reportStoragePath,omitempty"`

	// Report Url
	// +optional
	ReportUrl string `json:"reportUrl,omitempty"`

	// Is notification completed (default false)
	// +optional
	NotificationCompleted bool `json:"notificationCompleted,omitempty"`

	// Error message
	// +optional
	Error string `json:"error,omitempty"`
}

GatlingStatus defines the observed state of Gatling

func (*GatlingStatus) DeepCopy

func (in *GatlingStatus) DeepCopy() *GatlingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatlingStatus.

func (*GatlingStatus) DeepCopyInto

func (in *GatlingStatus) DeepCopyInto(out *GatlingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NotificationServiceSpec

type NotificationServiceSpec struct {
	// Provider specifies notification service provider
	// Supported providers: slack
	// +kubebuilder:validation:Required
	Provider string `json:"provider"`

	// The name of secret in which all key/value sets needed for the notification are stored
	// +kubebuilder:validation:Required
	SecretName string `json:"secretName"`
}

func (*NotificationServiceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationServiceSpec.

func (*NotificationServiceSpec) DeepCopyInto

func (in *NotificationServiceSpec) DeepCopyInto(out *NotificationServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSpec

type PodSpec struct {
	// The image that will be used for Gatling container.
	// +kubebuilder:validation:Optional
	GatlingImage string `json:"gatlingImage,omitempty"`

	// The image that will be used for rclone conatiner.
	// +kubebuilder:validation:Optional
	RcloneImage string `json:"rcloneImage,omitempty"`

	// Resources specifies the resource limits of the container.
	// +kubebuilder:validation:Optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Affinity specification
	// +kubebuilder:validation:Optional
	Affinity corev1.Affinity `json:"affinity,omitempty"`
}

PodSpec defines type to configure Gatling pod spec ref: mysql-operator/pkg/apis/mysql/v1alpha1/mysqlcluster_types.go

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestScenarioSpec

type TestScenarioSpec struct {
	// Test Start time
	// +kubebuilder:validation:Optional
	StartTime string `json:"startTime,omitempty"`

	// Number of pods running at the same time
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Optional
	Parallelism int32 `json:"parallelism,omitempty"`

	// Gatling Resources directory path where simulation files are stored
	// +kubebuilder:validation:Optional
	SimulationsDirectoryPath string `json:"simulationsDirectoryPath,omitempty"`

	// Gatling Simulation directory path where resources are stored
	// +kubebuilder:validation:Optional
	ResourcesDirectoryPath string `json:"resourcesDirectoryPath,omitempty"`

	// Gatling Results directory path where results are stored
	// +kubebuilder:validation:Optional
	ResultsDirectoryPath string `json:"resultsDirectoryPath,omitempty"`

	// Simulation Class
	// +kubebuilder:validation:Required
	SimulationClass string `json:"simulationClass"`

	// Simulation Data
	// +kubebuilder:validation:Optional
	SimulationData map[string]string `json:"simulationData,omitempty"`

	// Resource Data
	// +kubebuilder:validation:Optional
	ResourceData map[string]string `json:"resourceData,omitempty"`

	// Gatling Configurations
	// +kubebuilder:validation:Optional
	GatlingConf map[string]string `json:"gatlingConf,omitempty"`

	// Environment variables used for running load testing scenario
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

TestScenarioSpec defines the load testing scenario

func (*TestScenarioSpec) DeepCopy

func (in *TestScenarioSpec) DeepCopy() *TestScenarioSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestScenarioSpec.

func (*TestScenarioSpec) DeepCopyInto

func (in *TestScenarioSpec) DeepCopyInto(out *TestScenarioSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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