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

Commit b0ceaa7

Browse files
committed
#29 Remove duplicated code
1 parent 3461636 commit b0ceaa7

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

operator/controllers/execution/scan_controller.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -711,21 +711,6 @@ func (r *ScanReconciler) startReadOnlyHooks(scan *executionv1.Scan) error {
711711
return nil
712712
}
713713

714-
rules := []rbacv1.PolicyRule{
715-
{
716-
APIGroups: []string{"execution.experimental.securecodebox.io"},
717-
Resources: []string{"scans"},
718-
Verbs: []string{"get", "create", "list"},
719-
},
720-
}
721-
serviceAccountName := "scan-completion-hook"
722-
r.ensureServiceAccountExists(
723-
scan.Namespace,
724-
serviceAccountName,
725-
"ScanCompletionHooks need to access the current scan to view where its results are stored",
726-
rules,
727-
)
728-
729714
// Get all read-only-hooks for scan to later check that they weren't already created
730715
jobs, err := r.getJobsForScan(scan, client.MatchingLabels{
731716
"experimental.securecodebox.io/job-type": "read-only-hook",

0 commit comments

Comments
 (0)