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

Commit eae6caa

Browse files
committed
Remove copy pasta comments
1 parent dd3eb4a commit eae6caa

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

operator/controllers/execution/scan_controller.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func (r *ScanReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
115115
func (r *ScanReconciler) getJob(name, namespace string) (*batch.Job, error) {
116116
ctx := context.Background()
117117

118-
// check if k8s job for scan was already created
119118
var job batch.Job
120119
err := r.Get(ctx, types.NamespacedName{Name: name, Namespace: namespace}, &job)
121120
if apierrors.IsNotFound(err) {
@@ -169,12 +168,9 @@ func (r *ScanReconciler) startScan(scan *executionv1.Scan) error {
169168
return nil
170169
}
171170

172-
// get the scan template for the scan
171+
// get the ScanType for the scan
173172
var scanType executionv1.ScanType
174173
if err := r.Get(ctx, types.NamespacedName{Name: scan.Spec.ScanType, Namespace: scan.Namespace}, &scanType); err != nil {
175-
// we'll ignore not-found errors, since they can't be fixed by an immediate
176-
// requeue (we'll need to wait for a new notification), and we can get them
177-
// on deleted requests.
178174
log.V(7).Info("Unable to fetch ScanType")
179175

180176
scan.Status.State = "Errored"
@@ -205,9 +201,6 @@ func (r *ScanReconciler) startScan(scan *executionv1.Scan) error {
205201
job, err = r.constructJobForScan(scan, &scanType)
206202
if err != nil {
207203
log.Error(err, "unable to create job object ScanType")
208-
// we'll ignore not-found errors, since they can't be fixed by an immediate
209-
// requeue (we'll need to wait for a new notification), and we can get them
210-
// on deleted requests.
211204
return err
212205
}
213206

0 commit comments

Comments
 (0)