Skip to content

Commit da18627

Browse files
fabianvfjmccormick2001
andauthored
add storage spec to scorecard config (#135)
* add storage spec to scorecard config (cherry picked from commit e245efd) * Run make generate * Add godocs Co-authored-by: jmccormick2001 <[email protected]>
1 parent 1329f80 commit da18627

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

pkg/apis/scorecard/v1alpha3/configuration_types.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ type Configuration struct {
1919

2020
// Stages is a set of test stages to run. Once a stage is finished, the next stage in the slice will be run.
2121
Stages []StageConfiguration `json:"stages" yaml:"stages"`
22+
23+
// Storage is the optional storage configuration
24+
Storage Storage `json:"storage,omitempty" yaml:"storage,omitempty"`
2225
}
2326

2427
// StageConfiguration configures a set of tests to be run.
@@ -40,4 +43,24 @@ type TestConfiguration struct {
4043
Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
4144
// Labels further describe the test and enable selection.
4245
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
46+
// Storage is the optional storage configuration for the test image.
47+
Storage Storage `json:"storage,omitempty" yaml:"storage,omitempty"`
48+
}
49+
50+
// Storage configures custom storage options
51+
type Storage struct {
52+
// Spec contains the storage configuration options
53+
Spec StorageSpec `json:"spec" yaml:"spec"`
54+
}
55+
56+
// StorageSpec contains storage configuration options
57+
type StorageSpec struct {
58+
// MountPath configures the path to mount directories in the test pod
59+
MountPath MountPath `json:"mountPath,omitempty" yaml:"mountPath,omitempty"`
60+
}
61+
62+
// MountPath configures the path to mount directories in the test pod
63+
type MountPath struct {
64+
// Path is the fully qualified path that a directory should be mounted in the test pod
65+
Path string `json:"path,omitempty" yaml:"path,omitempty"`
4366
}

pkg/apis/scorecard/v1alpha3/zz_generated.deepcopy.go

Lines changed: 49 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)