Skip to content

Commit

Permalink
feat: use default storage class name field (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin authored Apr 11, 2024
1 parent a36d153 commit 42e9be4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
6 changes: 4 additions & 2 deletions api/testexecution/v1/testexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type Variable commonv1.Variable
// artifact request body with test artifacts
type ArtifactRequest struct {
// artifact storage class name for container executor
StorageClassName string `json:"storageClassName"`
StorageClassName string `json:"storageClassName,omitempty"`
// artifact volume mount path for container executor
VolumeMountPath string `json:"volumeMountPath"`
VolumeMountPath string `json:"volumeMountPath,omitempty"`
// artifact directories for scraping
Dirs []string `json:"dirs,omitempty"`
// regexp to filter scraped artifacts, single or comma separated
Expand All @@ -44,6 +44,8 @@ type ArtifactRequest struct {
OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"`
// whether to share volume between pods
SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"`
// whether to use default storage class name
UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"`
}

// running context for test or test suite execution
Expand Down
2 changes: 2 additions & 0 deletions api/tests/v3/test_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ type ArtifactRequest struct {
OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"`
// whether to share volume between pods
SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"`
// whether to use default storage class name
UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"`
}

type RunningContext commonv1.RunningContext
Expand Down
6 changes: 4 additions & 2 deletions api/testsuiteexecution/v1/testsuiteexecution_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ type Execution struct {
// artifact request body with test artifacts
type ArtifactRequest struct {
// artifact storage class name for container executor
StorageClassName string `json:"storageClassName"`
StorageClassName string `json:"storageClassName,omitempty"`
// artifact volume mount path for container executor
VolumeMountPath string `json:"volumeMountPath"`
VolumeMountPath string `json:"volumeMountPath,omitempty"`
// artifact directories for scraping
Dirs []string `json:"dirs,omitempty"`
// regexp to filter scraped artifacts, single or comma separated
Expand All @@ -304,6 +304,8 @@ type ArtifactRequest struct {
OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"`
// whether to share volume between pods
SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"`
// whether to use default storage class name
UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"`
}

// TestContent defines test content
Expand Down
12 changes: 6 additions & 6 deletions config/crd/bases/tests.testkube.io_testexecutions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ spec:
storageClassName:
description: artifact storage class name for container executor
type: string
useDefaultStorageClassName:
description: whether to use default storage class name
type: boolean
volumeMountPath:
description: artifact volume mount path for container executor
type: string
required:
- storageClassName
- volumeMountPath
type: object
command:
description: executor binary command
Expand Down Expand Up @@ -467,12 +467,12 @@ spec:
storageClassName:
description: artifact storage class name for container executor
type: string
useDefaultStorageClassName:
description: whether to use default storage class name
type: boolean
volumeMountPath:
description: artifact volume mount path for container executor
type: string
required:
- storageClassName
- volumeMountPath
type: object
bucketName:
description: minio bucket name to get uploads from
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/tests.testkube.io_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ spec:
storageClassName:
description: artifact storage class name for container executor
type: string
useDefaultStorageClassName:
description: whether to use default storage class name
type: boolean
volumeMountPath:
description: artifact volume mount path for container executor
type: string
Expand Down
14 changes: 8 additions & 6 deletions config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,14 @@ spec:
description: artifact storage class name for
container executor
type: string
useDefaultStorageClassName:
description: whether to use default storage
class name
type: boolean
volumeMountPath:
description: artifact volume mount path for
container executor
type: string
required:
- storageClassName
- volumeMountPath
type: object
bucketName:
description: minio bucket name to get uploads
Expand Down Expand Up @@ -900,13 +901,14 @@ spec:
description: artifact storage class name for container
executor
type: string
useDefaultStorageClassName:
description: whether to use default storage class
name
type: boolean
volumeMountPath:
description: artifact volume mount path for container
executor
type: string
required:
- storageClassName
- volumeMountPath
type: object
bucketName:
description: minio bucket name to get uploads from
Expand Down

0 comments on commit 42e9be4

Please sign in to comment.