Skip to content

Commit

Permalink
Merge pull request #109 from st-tech/add-pv-support
Browse files Browse the repository at this point in the history
Add pv support
  • Loading branch information
kane8n authored Mar 28, 2024
2 parents 6a49574 + dae80d0 commit 8ce9dd1
Show file tree
Hide file tree
Showing 15 changed files with 3,462 additions and 51 deletions.
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

0 comments on commit 8ce9dd1

Please sign in to comment.