Skip to content

Commit 8ce9dd1

Browse files
authored
Merge pull request #109 from st-tech/add-pv-support
Add pv support
2 parents 6a49574 + dae80d0 commit 8ce9dd1

15 files changed

+3462
-51
lines changed

api/v1alpha1/gatling_types.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ type GatlingSpec struct {
5454
// +kubebuilder:validation:Optional
5555
CloudStorageSpec CloudStorageSpec `json:"cloudStorageSpec,omitempty"`
5656

57+
// (Optional) PersistentVolume specification.
58+
// +kubebuilder:validation:Optional
59+
PersistentVolumeSpec PersistentVolumeSpec `json:"persistentVolume,omitempty"`
60+
61+
// (Optional) PersistentVolumeClaim specification.
62+
// +kubebuilder:validation:Optional
63+
PersistentVolumeClaimSpec PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
64+
5765
// (Optional) Notification Service specification.
5866
// +kubebuilder:validation:Optional
5967
NotificationServiceSpec NotificationServiceSpec `json:"notificationServiceSpec,omitempty"`
@@ -88,6 +96,10 @@ type PodSpec struct {
8896
// (Required) ServiceAccountName specification.
8997
// +kubebuilder:validation:Required
9098
ServiceAccountName string `json:"serviceAccountName"`
99+
100+
// (Optional) volumes specification.
101+
// +kubebuilder:validation:Optional
102+
Volumes []corev1.Volume `json:"volumes,omitempty"`
91103
}
92104

93105
// TestScenarioSpec defines the load testing scenario
@@ -133,6 +145,10 @@ type TestScenarioSpec struct {
133145
// (Optional) Environment variables used for running load testing scenario.
134146
// +optional
135147
Env []corev1.EnvVar `json:"env,omitempty"`
148+
149+
// (Optional) Pod volumes to mount into the container's filesystem.
150+
// +kubebuilder:validation:Optional
151+
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
136152
}
137153

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

186+
type PersistentVolumeSpec struct {
187+
// (Required) The name of the PersistentVolume.
188+
// +kubebuilder:validation:Required
189+
Name string `json:"name"`
190+
191+
// (Required) PersistentVolumeSpec is the specification of a persistent volume.
192+
// +kubebuilder:validation:Required
193+
Spec corev1.PersistentVolumeSpec `json:"spec"`
194+
}
195+
196+
type PersistentVolumeClaimSpec struct {
197+
// (Required) The name of the PersistentVolumeClaim.
198+
// +kubebuilder:validation:Required
199+
Name string `json:"name"`
200+
201+
// (Required) PersistentVolumeClaimSpec is the specification of a persistent volume.
202+
// +kubebuilder:validation:Required
203+
Spec corev1.PersistentVolumeClaimSpec `json:"spec"`
204+
}
205+
170206
// GatlingStatus defines the observed state of Gatling
171207
type GatlingStatus struct {
172208
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster

api/v1alpha1/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ limitations under the License.
1515
*/
1616

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

2222
import (

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)