You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/controllers/clusterresourceplacement/controller.go
+29-28Lines changed: 29 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ import (
49
49
)
50
50
51
51
// The max size of an object in k8s is 1.5MB because of ETCD limit https://etcd.io/docs/v3.3/dev-guide/limit/.
52
-
// We choose 800KB as the soft limit for all the selected resources within one clusterResourceSnapshot object because of this test in k8s which checks
52
+
// We choose 800KB as the soft limit for all the selected resources within one resourceSnapshot object because of this test in k8s which checks
53
53
// if object size is greater than 1MB https://github.com/kubernetes/kubernetes/blob/db1990f48b92d603f469c1c89e2ad36da1b74846/test/integration/master/synthetic_master_test.go#L337
klog.ErrorS(err, "Failed to extract the resource index from the clusterResourceSnapshot", "placement", placementKObj, "clusterResourceSnapshot", latestResourceSnapshotKObj)
189
+
klog.ErrorS(err, "Failed to extract the resource index from the resourceSnapshot", "placement", placementKObj, "resourceSnapshot", latestResourceSnapshotKObj)
klog.ErrorS(err, "Failed to collect resource identifiers from the clusterResourceSnapshot", "placement", placementKObj, "clusterResourceSnapshot", latestResourceSnapshotKObj)
194
+
klog.ErrorS(err, "Failed to collect resource identifiers from the resourceSnapshot", "placement", placementKObj, "resourceSnapshot", latestResourceSnapshotKObj)
195
195
return ctrl.Result{}, err
196
196
}
197
-
klog.V(2).InfoS("Fetched the selected resources from the lastestResourceSnapshot", "placement", placementKObj, "clusterResourceSnapshot", latestResourceSnapshotKObj, "generation", placementObj.GetGeneration())
197
+
klog.V(2).InfoS("Fetched the selected resources from the lastestResourceSnapshot", "placement", placementKObj, "resourceSnapshot", latestResourceSnapshotKObj, "generation", placementObj.GetGeneration())
198
198
}
199
199
200
-
// isClusterScheduled is to indicate whether we need to requeue the placement request to track the rollout status.
// Rollout is considered to be completed when all the expected condition types are set to the
224
224
// True status.
225
-
ifisRolloutCompleted(placementObj) {
226
-
if!isRolloutCompleted(oldPlacement) {
225
+
ifisPlacementRolloutCompleted(placementObj) {
226
+
if!isPlacementRolloutCompleted(oldPlacement) {
227
227
klog.V(2).InfoS("Placement has finished the rollout process and reached the desired status", "placement", placementKObj, "generation", placementObj.GetGeneration())
228
228
r.Recorder.Event(placementObj, corev1.EventTypeNormal, "PlacementRolloutCompleted", "Placement has finished the rollout process and reached the desired status")
klog.V(2).InfoS("Marked the existing clusterResourceSnapshot as inactive", "placement", placementKObj, "clusterResourceSnapshot", klog.KObj(latestResourceSnapshot))
593
+
klog.V(2).InfoS("Marked the existing resourceSnapshot as inactive", "placement", placementKObj, "resourceSnapshot", klog.KObj(latestResourceSnapshot))
600
594
}
601
595
602
596
// only delete redundant resource snapshots and increment the latest resource snapshot index if new master resource snapshot is to be created.
@@ -645,32 +639,33 @@ func (r *Reconciler) shouldCreateNewResourceSnapshotNow(ctx context.Context, lat
klog.ErrorS(controller.NewUnexpectedBehaviorError(err), "Failed to get the NextResourceSnapshotCandidateDetectionTimeAnnotation", "clusterResourceSnapshot", snapshotKObj)
642
+
klog.ErrorS(controller.NewUnexpectedBehaviorError(err), "Failed to get the NextResourceSnapshotCandidateDetectionTimeAnnotation", "resourceSnapshot", snapshotKObj)
649
643
}
650
644
// If the annotation is not set, set next resource snapshot candidate detection time is now.
0 commit comments