diff --git a/pkg/apis/scorecard/v1alpha3/configuration_types.go b/pkg/apis/scorecard/v1alpha3/configuration_types.go index ae931dff5..9a447b22c 100644 --- a/pkg/apis/scorecard/v1alpha3/configuration_types.go +++ b/pkg/apis/scorecard/v1alpha3/configuration_types.go @@ -19,6 +19,9 @@ type Configuration struct { // Stages is a set of test stages to run. Once a stage is finished, the next stage in the slice will be run. Stages []StageConfiguration `json:"stages" yaml:"stages"` + + // Storage is the optional storage configuration + Storage Storage `json:"storage,omitempty" yaml:"storage,omitempty"` } // StageConfiguration configures a set of tests to be run. @@ -40,4 +43,24 @@ type TestConfiguration struct { Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` // Labels further describe the test and enable selection. Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + // Storage is the optional storage configuration for the test image. + Storage Storage `json:"storage,omitempty" yaml:"storage,omitempty"` +} + +// Storage configures custom storage options +type Storage struct { + // Spec contains the storage configuration options + Spec StorageSpec `json:"spec" yaml:"spec"` +} + +// StorageSpec contains storage configuration options +type StorageSpec struct { + // MountPath configures the path to mount directories in the test pod + MountPath MountPath `json:"mountPath,omitempty" yaml:"mountPath,omitempty"` +} + +// MountPath configures the path to mount directories in the test pod +type MountPath struct { + // Path is the fully qualified path that a directory should be mounted in the test pod + Path string `json:"path,omitempty" yaml:"path,omitempty"` } diff --git a/pkg/apis/scorecard/v1alpha3/zz_generated.deepcopy.go b/pkg/apis/scorecard/v1alpha3/zz_generated.deepcopy.go index 0966f76ee..8f4e5aad6 100644 --- a/pkg/apis/scorecard/v1alpha3/zz_generated.deepcopy.go +++ b/pkg/apis/scorecard/v1alpha3/zz_generated.deepcopy.go @@ -35,6 +35,7 @@ func (in *Configuration) DeepCopyInto(out *Configuration) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Storage = in.Storage } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration. @@ -47,6 +48,21 @@ func (in *Configuration) DeepCopy() *Configuration { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MountPath) DeepCopyInto(out *MountPath) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountPath. +func (in *MountPath) DeepCopy() *MountPath { + if in == nil { + return nil + } + out := new(MountPath) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StageConfiguration) DeepCopyInto(out *StageConfiguration) { *out = *in @@ -69,6 +85,38 @@ func (in *StageConfiguration) DeepCopy() *StageConfiguration { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + out.Spec = in.Spec +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageSpec) DeepCopyInto(out *StorageSpec) { + *out = *in + out.MountPath = in.MountPath +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec. +func (in *StorageSpec) DeepCopy() *StorageSpec { + if in == nil { + return nil + } + out := new(StorageSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Test) DeepCopyInto(out *Test) { *out = *in @@ -110,6 +158,7 @@ func (in *TestConfiguration) DeepCopyInto(out *TestConfiguration) { (*out)[key] = val } } + out.Storage = in.Storage } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestConfiguration.