Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pv support #109

Merged
merged 9 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions api/v1alpha1/gatling_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ type GatlingSpec struct {
// +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"`
Expand Down Expand Up @@ -88,6 +96,10 @@ type PodSpec struct {
// (Required) ServiceAccountName specification.
// +kubebuilder:validation:Required
ServiceAccountName string `json:"serviceAccountName"`

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

// TestScenarioSpec defines the load testing scenario
Expand Down Expand Up @@ -133,6 +145,10 @@ type TestScenarioSpec struct {
// (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"`
}

// CloudStorageSpec defines Cloud Storage Provider specification.
Expand Down Expand Up @@ -167,6 +183,26 @@ type NotificationServiceSpec struct {
SecretName string `json:"secretName"`
}

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

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

// GatlingStatus defines the observed state of Gatling
type GatlingStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.
*/

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

import (
Expand Down
48 changes: 48 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading