Skip to content

Commit 55ec949

Browse files
J12934rfelber
authored andcommitted
#1746 Add option in scanner charts to start scan job in suspended mode
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
1 parent 5ada7f7 commit 55ec949

100 files changed

Lines changed: 585 additions & 43 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.templates/new-scanner/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Please include any extra Helm chart configurations that can be useful.
8989
| scanner.securityContext.privileged | bool | `false` | Ensures that the scanner container is not run in privileged mode |
9090
| scanner.securityContext.readOnlyRootFilesystem | bool | `true` | Prevents write access to the containers file system |
9191
| scanner.securityContext.runAsNonRoot | bool | `true` | Enforces that the scanner image is run as a non root user |
92+
| scanner.suspend | bool | `false` | if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue |
9293
| scanner.tolerations | list | `[]` | Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
9394
| scanner.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the scanner will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
9495

.templates/new-scanner/templates/new-scanner-scan-type.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
location: "/home/securecodebox/new-scanner-results.json"
1313
jobTemplate:
1414
spec:
15+
suspend: {{ .Values.scanner.suspend | default false }}
1516
{{- if .Values.scanner.ttlSecondsAfterFinished }}
1617
ttlSecondsAfterFinished: {{ .Values.scanner.ttlSecondsAfterFinished }}
1718
{{- end }}

.templates/new-scanner/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ scanner:
102102
# scanner.tolerations -- Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
103103
tolerations: []
104104

105+
# -- if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue
106+
suspend: false
107+
105108
cascadingRules:
106109
# cascadingRules.enabled -- Enables or disables the installation of the default cascading rules for this scanner
107110
enabled: false

scanners/amass/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Kubernetes: `>=v1.11.0-0`
9999
| scanner.securityContext.privileged | bool | `false` | Ensures that the scanner container is not run in privileged mode |
100100
| scanner.securityContext.readOnlyRootFilesystem | bool | `false` | Prevents write access to the containers file system |
101101
| scanner.securityContext.runAsNonRoot | bool | `false` | Enforces that the scanner image is run as a non root user |
102+
| scanner.suspend | bool | `false` | if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue |
102103
| scanner.tolerations | list | `[]` | Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
103104
| scanner.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the scanner will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
104105

scanners/amass/docs/README.ArtifactHub.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Kubernetes: `>=v1.11.0-0`
104104
| scanner.securityContext.privileged | bool | `false` | Ensures that the scanner container is not run in privileged mode |
105105
| scanner.securityContext.readOnlyRootFilesystem | bool | `false` | Prevents write access to the containers file system |
106106
| scanner.securityContext.runAsNonRoot | bool | `false` | Enforces that the scanner image is run as a non root user |
107+
| scanner.suspend | bool | `false` | if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue |
107108
| scanner.tolerations | list | `[]` | Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
108109
| scanner.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the scanner will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
109110

scanners/amass/templates/amass-scan-type.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
location: "/home/securecodebox/amass-results.jsonl"
1313
jobTemplate:
1414
spec:
15+
suspend: {{ .Values.scanner.suspend | default false }}
1516
{{- if .Values.scanner.ttlSecondsAfterFinished }}
1617
ttlSecondsAfterFinished: {{ .Values.scanner.ttlSecondsAfterFinished }}
1718
{{- end }}

scanners/amass/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ scanner:
107107
# scanner.tolerations -- Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
108108
tolerations: []
109109

110+
# -- if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue
111+
suspend: false
112+
110113
cascadingRules:
111114
# cascadingRules.enabled -- Enables or disables the installation of the default cascading rules for this scanner
112115
enabled: false

scanners/cmseek/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Kubernetes: `>=v1.11.0-0`
100100
| scanner.securityContext.privileged | bool | `false` | Ensures that the scanner container is not run in privileged mode |
101101
| scanner.securityContext.readOnlyRootFilesystem | bool | `false` | Prevents write access to the containers file system |
102102
| scanner.securityContext.runAsNonRoot | bool | `true` | Enforces that the scanner image is run as a non root user |
103+
| scanner.suspend | bool | `false` | if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue |
103104
| scanner.tolerations | list | `[]` | Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
104105
| scanner.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the scanner will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
105106

scanners/cmseek/docs/README.ArtifactHub.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Kubernetes: `>=v1.11.0-0`
107107
| scanner.securityContext.privileged | bool | `false` | Ensures that the scanner container is not run in privileged mode |
108108
| scanner.securityContext.readOnlyRootFilesystem | bool | `false` | Prevents write access to the containers file system |
109109
| scanner.securityContext.runAsNonRoot | bool | `true` | Enforces that the scanner image is run as a non root user |
110+
| scanner.suspend | bool | `false` | if set to true the scan job will be suspended after creation. You can then resume the job using `kubectl resume <jobname>` or using a job scheduler like kueue |
110111
| scanner.tolerations | list | `[]` | Optional tolerations settings that control how the scanner job is scheduled (see: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
111112
| scanner.ttlSecondsAfterFinished | string | `nil` | seconds after which the kubernetes job for the scanner will be deleted. Requires the Kubernetes TTLAfterFinished controller: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ |
112113

scanners/cmseek/templates/cmseek-scan-type.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
location: "/home/securecodebox/cmseek.json"
1313
jobTemplate:
1414
spec:
15+
suspend: {{ .Values.scanner.suspend | default false }}
1516
{{- if .Values.scanner.ttlSecondsAfterFinished }}
1617
ttlSecondsAfterFinished: {{ .Values.scanner.ttlSecondsAfterFinished }}
1718
{{- end }}

0 commit comments

Comments
 (0)