Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 845c18a

Browse files
committed
Add default values for lurcher image and pull policy
This is mostly relevant in local dev environments where these arent set
1 parent cb60660 commit 845c18a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

operator/controllers/execution/scan_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ func (r *ScanReconciler) constructJobForScan(scan *executionv1.Scan, scanType *e
427427
)
428428

429429
lurcherImage := os.Getenv("LURCHER_IMAGE")
430+
if lurcherImage == "" {
431+
lurcherImage = "scbexperimental/lurcher:latest"
432+
}
430433
lurcherPullPolicyRaw := os.Getenv("LURCHER_PULL_POLICY")
431434
var lurcherPullPolicy corev1.PullPolicy
432435
switch lurcherPullPolicyRaw {
@@ -436,6 +439,8 @@ func (r *ScanReconciler) constructJobForScan(scan *executionv1.Scan, scanType *e
436439
lurcherPullPolicy = corev1.PullIfNotPresent
437440
case "Never":
438441
lurcherPullPolicy = corev1.PullNever
442+
case "":
443+
lurcherPullPolicy = corev1.PullAlways
439444
default:
440445
return nil, fmt.Errorf("Unkown imagePull Policy for lurcher: %s", lurcherPullPolicyRaw)
441446
}

0 commit comments

Comments
 (0)