Skip to content

Commit

Permalink
When action is Scan nothing is required
Browse files Browse the repository at this point in the history
  • Loading branch information
mgianluc committed Jan 15, 2024
1 parent c8912eb commit e483882
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/controller/executor/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,13 @@ func processCleanerInstance(ctx context.Context, cleanerName string, logger logr
}

var processedResources []ResourceResult
if cleaner.Spec.Action == appsv1alpha1.ActionDelete {
switch cleaner.Spec.Action {
case appsv1alpha1.ActionDelete:
processedResources, err = deleteMatchingResources(ctx, resources, logger)
} else {
case appsv1alpha1.ActionTransform:
processedResources, err = updateMatchingResources(ctx, resources, cleaner.Spec.Transform, logger)
case appsv1alpha1.ActionScan:
// Nothing to do do
}

sendErr := sendNotifications(ctx, processedResources, cleaner, logger)
Expand Down

0 comments on commit e483882

Please sign in to comment.