v1alpha1

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 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 {
	// (Required) Provider specifies the cloud provider that will be used.
	// Supported providers: `aws`, `gcp`, and `azure`
	// +kubebuilder:validation:Required
	Provider string `json:"provider"`

	// (Required) Storage Bucket Name.
	// +kubebuilder:validation:Required
	Bucket string `json:"bucket"`

	// (Optional) Region Name.
	// +kubebuilder:validation:Optional
	Region string `json:"region,omitempty"`

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

CloudStorageSpec defines Cloud Storage Provider specification.

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"`

	// GatlingSpec defines the desired state of Gatling
	Spec GatlingSpec `json:"spec,omitempty"`
	// GatlingStatus defines the observed state of Gatling
	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 {

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

	// (Optional) The flag of generating gatling report at each pod
	// +kubebuilder:default=false
	// +kubebuilder:validation:Optional
	GenerateLocalReport bool `json:"generateLocalReport,omitempty"`

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

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

	// (Optional) Gatling Pod specification.
	// +kubebuilder:validation:Optional
	PodSpec PodSpec `json:"podSpec,omitempty"`

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

	// (Optional) PersistentVolume specification.
	// +kubebuilder:validation:Optional
	PersistentVolumeSpec PersistentVolumeSpec `json:"persistentVolume,omitempty"`

	// (Optional) PersistentVolumeClaim specification.
	// +kubebuilder:validation:Optional
	PersistentVolumeClaimSpec PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`

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

	// (Required) 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"`

	// The number of successfully completed runner pods. The format is (completed#/parallelism#)
	// +optional
	RunnerCompletions string `json:"runnerCompletions,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 {
	// (Required) Provider specifies notification service provider.
	// Supported providers: `slack`
	// +kubebuilder:validation:Required
	Provider string `json:"provider"`

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

NotificationServiceSpec defines Notification Service Provider specification.

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 PersistentVolumeClaimSpec added in v0.9.6

type PersistentVolumeClaimSpec struct {
	// (Required) The name of the PersistentVolumeClaim.
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// (Required) PersistentVolumeClaimSpec is the specification of a persistent volume.
	// +kubebuilder:validation:Required
	Spec corev1.PersistentVolumeClaimSpec `json:"spec"`
}

func (*PersistentVolumeClaimSpec) DeepCopy added in v0.9.6

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

func (*PersistentVolumeClaimSpec) DeepCopyInto added in v0.9.6

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

type PersistentVolumeSpec added in v0.9.6

type PersistentVolumeSpec struct {
	// (Required) The name of the PersistentVolume.
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// (Required) PersistentVolumeSpec is the specification of a persistent volume.
	// +kubebuilder:validation:Required
	Spec corev1.PersistentVolumeSpec `json:"spec"`
}

func (*PersistentVolumeSpec) DeepCopy added in v0.9.6

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

func (*PersistentVolumeSpec) DeepCopyInto added in v0.9.6

func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec)

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

type PodSpec

type PodSpec struct {
	// (Optional) The image that will be used for Gatling container. Defaults to `ghcr.io/st-tech/gatling:latest`
	// +kubebuilder:validation:Optional
	GatlingImage string `json:"gatlingImage,omitempty"`

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

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

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

	// (Optional) Tolerations specification.
	// +kubebuilder:validation:Optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// (Required) ServiceAccountName specification.
	// +kubebuilder:validation:Required
	ServiceAccountName string `json:"serviceAccountName"`

	// (Optional) volumes specification.
	// +kubebuilder:validation:Optional
	Volumes []corev1.Volume `json:"volumes,omitempty"`
}

PodSpec defines type to configure Gatling Pod specification. For the idea of PodSpec, refer to bitpoke/mysql-operator(https://github.com/bitpoke/mysql-operator/blob/master/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 {
	// (Optional) Test Start time.
	// +kubebuilder:validation:Optional
	StartTime string `json:"startTime,omitempty"`

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

	// (Optional) Gatling simulation format, supports `bundle` and `gradle`. Defaults to `bundle`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=bundle;gradle
	SimulationsFormat string `json:"simulationsFormat,omitempty"`

	// (Optional) Gatling Resources directory path where simulation files are stored. Defaults to `/opt/gatling/user-files/simulations`
	// +kubebuilder:validation:Optional
	SimulationsDirectoryPath string `json:"simulationsDirectoryPath,omitempty"`

	// (Optional) Gatling Simulation directory path where resources are stored. Defaults to `/opt/gatling/user-files/resources`
	// +kubebuilder:validation:Optional
	ResourcesDirectoryPath string `json:"resourcesDirectoryPath,omitempty"`

	// (Optional) Gatling Results directory path where results are stored. Defaults to `/opt/gatling/results`
	// +kubebuilder:validation:Optional
	ResultsDirectoryPath string `json:"resultsDirectoryPath,omitempty"`

	// (Required) Simulation Class Name.
	// +kubebuilder:validation:Required
	SimulationClass string `json:"simulationClass"`

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

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

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

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

	// (Optional) Pod volumes to mount into the container's filesystem.
	// +kubebuilder:validation:Optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,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