@@ -179,7 +179,7 @@ func (r *ScanReconciler) startScan(scan *executionv1.Scan) error {
179179 Verbs : []string {"get" },
180180 },
181181 }
182- r .EnsureServiceAccountExists (
182+ r .ensureServiceAccountExists (
183183 scan .Namespace ,
184184 "lurcher" ,
185185 "Lurcher is used to extract results from secureCodeBox Scans. It needs rights to get and watch the status of pods to see when the scans have finished." ,
@@ -277,7 +277,7 @@ func (r *ScanReconciler) startParser(scan *executionv1.Scan) error {
277277 Verbs : []string {"get" , "patch" },
278278 },
279279 }
280- r .EnsureServiceAccountExists (
280+ r .ensureServiceAccountExists (
281281 scan .Namespace ,
282282 "parser" ,
283283 "Parser need to access the status of Scans to update how many findings have been identified" ,
@@ -533,7 +533,7 @@ func (r *ScanReconciler) startPersistenceProvider(scan *executionv1.Scan) error
533533 Verbs : []string {"get" },
534534 },
535535 }
536- r .EnsureServiceAccountExists (
536+ r .ensureServiceAccountExists (
537537 scan .Namespace ,
538538 "persistence" ,
539539 "PersistenceProvider need to access the current scan to view where its results are stored" ,
@@ -659,7 +659,7 @@ func (r *ScanReconciler) checkIfPersistingIsCompleted(scan *executionv1.Scan) er
659659 return nil
660660}
661661
662- func (r * ScanReconciler ) EnsureServiceAccountExists (namespace , serviceAccountName , description string , policyRules []rbacv1.PolicyRule ) error {
662+ func (r * ScanReconciler ) ensureServiceAccountExists (namespace , serviceAccountName , description string , policyRules []rbacv1.PolicyRule ) error {
663663 ctx := context .Background ()
664664
665665 var serviceAccount corev1.ServiceAccount
@@ -746,6 +746,7 @@ func (r *ScanReconciler) EnsureServiceAccountExists(namespace, serviceAccountNam
746746 return nil
747747}
748748
749+ // SetupWithManager sets up the controller and initializes every thing it needs
749750func (r * ScanReconciler ) SetupWithManager (mgr ctrl.Manager ) error {
750751 endpoint := os .Getenv ("S3_ENDPOINT" )
751752 accessKeyID := os .Getenv ("S3_ACCESS_KEY" )
0 commit comments