Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions operator/apis/execution/v1/scan_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type ScanSpec struct {
Volumes []corev1.Volume `json:"volumes,omitempty"`
// VolumeMounts allows to specify volume mounts for the scan container.
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
// InitContainers allows to specify init containers for the scan container, to pre-load data into them.
InitContainers []corev1.Container `json:"initContainers,omitempty"`

Cascades *CascadeSpec `json:"cascades,omitempty"`
}
Expand Down
7 changes: 7 additions & 0 deletions operator/apis/execution/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,112 changes: 1,109 additions & 3 deletions operator/config/crd/bases/cascading.securecodebox.io_cascadingrules.yaml

Large diffs are not rendered by default.

1,086 changes: 1,086 additions & 0 deletions operator/config/crd/bases/execution.securecodebox.io_scans.yaml

Large diffs are not rendered by default.

1,109 changes: 1,109 additions & 0 deletions operator/config/crd/bases/execution.securecodebox.io_scheduledscans.yaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions operator/controllers/execution/scans/scan_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ func (r *ScanReconciler) constructJobForScan(scan *executionv1.Scan, scanType *e
scan.Spec.Volumes...,
)

// Merge initContainers from ScanTemplate with initContainers defined in scan
job.Spec.Template.Spec.InitContainers = append(
job.Spec.Template.Spec.InitContainers,
scan.Spec.InitContainers...,
)

// Using command over args
job.Spec.Template.Spec.Containers[0].Command = command
job.Spec.Template.Spec.Containers[0].Args = nil
Expand Down
1,137 changes: 1,119 additions & 18 deletions operator/crds/cascading.securecodebox.io_cascadingrules.yaml

Large diffs are not rendered by default.

26 changes: 9 additions & 17 deletions operator/crds/execution.securecodebox.io_parsedefinitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ metadata:
creationTimestamp: null
name: parsedefinitions.execution.securecodebox.io
spec:
preserveUnknownFields: false
group: execution.securecodebox.io
names:
kind: ParseDefinition
Expand Down Expand Up @@ -661,20 +660,15 @@ spec:
type: array
dataSource:
description: 'This field can be used to specify
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot
- Beta) * An existing PVC (PersistentVolumeClaim)
* An existing custom resource/object that implements
data population (Alpha) In order to use VolumeSnapshot
object types, the appropriate feature gate must
be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource)
If the provisioner or an external controller can
support the specified data source, it will create
a new volume based on the contents of the specified
data source. If the specified data source is not
supported, the volume will not be created and
the failure will be reported as an event. In the
future, we plan to support more data source types
and the behavior of the provisioner may change.'
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
* An existing PVC (PersistentVolumeClaim) * An
existing custom resource that implements data
population (Alpha) In order to use custom resource
types that implement data population, the AnyVolumeDataSource
feature gate must be enabled. If the provisioner
or an external controller can support the specified
data source, it will create a new volume based
on the contents of the specified data source.'
properties:
apiGroup:
description: APIGroup is the group for the resource
Expand Down Expand Up @@ -1377,8 +1371,6 @@ spec:
type: object
type: object
type: array
required:
- sources
type: object
quobyte:
description: Quobyte represents a Quobyte mount on the host
Expand Down
26 changes: 9 additions & 17 deletions operator/crds/execution.securecodebox.io_scancompletionhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ metadata:
creationTimestamp: null
name: scancompletionhooks.execution.securecodebox.io
spec:
preserveUnknownFields: false
group: execution.securecodebox.io
names:
kind: ScanCompletionHook
Expand Down Expand Up @@ -677,20 +676,15 @@ spec:
type: array
dataSource:
description: 'This field can be used to specify
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot
- Beta) * An existing PVC (PersistentVolumeClaim)
* An existing custom resource/object that implements
data population (Alpha) In order to use VolumeSnapshot
object types, the appropriate feature gate must
be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource)
If the provisioner or an external controller can
support the specified data source, it will create
a new volume based on the contents of the specified
data source. If the specified data source is not
supported, the volume will not be created and
the failure will be reported as an event. In the
future, we plan to support more data source types
and the behavior of the provisioner may change.'
either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
* An existing PVC (PersistentVolumeClaim) * An
existing custom resource that implements data
population (Alpha) In order to use custom resource
types that implement data population, the AnyVolumeDataSource
feature gate must be enabled. If the provisioner
or an external controller can support the specified
data source, it will create a new volume based
on the contents of the specified data source.'
properties:
apiGroup:
description: APIGroup is the group for the resource
Expand Down Expand Up @@ -1393,8 +1387,6 @@ spec:
type: object
type: object
type: array
required:
- sources
type: object
quobyte:
description: Quobyte represents a Quobyte mount on the host
Expand Down
Loading