Skip to content

Commit

Permalink
Update controllers/cluster_controller.go
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Sommer <[email protected]>
  • Loading branch information
calvix and AndiDog authored Apr 30, 2024
1 parent d214104 commit 74d990b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (r *ClusterReconciler) reconcile(ctx context.Context, cluster *capi.Cluster
// ignore cluster from being deleted if it is older than 7 days and do NOT have keep-until label
// this is to prevent deletion in a case of accidental deployment of the app to production MCs
if time.Since(cluster.CreationTimestamp.Time).Hours() > 24*7 {
log.Info(fmt.Sprintf("Cluster is older than 7 days and do not have annotation %s. Cluster will be ignored for deletion", keepUntil))
log.Info(fmt.Sprintf("Cluster is older than 7 days and does not have label %s. Cluster will be ignored for deletion", keepUntil))
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 74d990b

Please sign in to comment.