Skip to content

Commit 89b1a10

Browse files
committed
address comments
Signed-off-by: Zhiying Lin <[email protected]>
1 parent d9b212b commit 89b1a10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

charts/hub-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documen
4040
| ConcurrentResourceChangeSyncs | The number of resourceChange reconcilers that are allowed to run concurrently. | `20` |
4141
| logFileMaxSize | Max size of log file before rotation | `1000000` |
4242
| MaxFleetSizeSupported | The max number of member clusters this fleet supports. | `100` |
43-
| resourceSnapshotCreationInterval | The interval (in seconds) at which resource snapshots are created. | `1m` |
43+
| resourceSnapshotCreationInterval | The interval at which resource snapshots are created. | `1m` |

pkg/controllers/clusterresourceplacement/controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ func (r *Reconciler) getOrCreateClusterResourceSnapshot(ctx context.Context, crp
497497
// When the latest resource snapshot without the isLastest label, it means it fails to create the new
498498
// resource snapshot in the last reconcile and we don't need to check and delay the request.
499499
if since := time.Since(latestResourceSnapshot.CreationTimestamp.Time); since < r.ResourceSnapshotCreationInterval {
500-
// If the latest resource snapshot is created less than a minute ago, requeue the request to avoid
501-
// too frequent update.
502-
klog.V(2).InfoS("The latest resource snapshot is created less than a minute ago, skipping the update", "clusterResourcePlacement", crpKObj,
500+
// If the latest resource snapshot is created less than configured the resourceSnapshotCreationInterval,
501+
// requeue the request to avoid too frequent update.
502+
klog.V(2).InfoS("The latest resource snapshot is just created, skipping the update", "clusterResourcePlacement", crpKObj,
503503
"clusterResourceSnapshot", klog.KObj(latestResourceSnapshot), "creationTime", latestResourceSnapshot.CreationTimestamp, "configuredResourceSnapshotCreationInterval", r.ResourceSnapshotCreationInterval, "afterDuration", r.ResourceSnapshotCreationInterval-since)
504504
return ctrl.Result{Requeue: true, RequeueAfter: r.ResourceSnapshotCreationInterval - since}, nil, nil
505505
}

0 commit comments

Comments
 (0)