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
// NextResourceSnapshotCandidateDetectionTimeAnnotation is the annotation to store the time of next resourceSnapshot candidate detected by the controller.
Copy file name to clipboardExpand all lines: cmd/hubagent/options/options.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ func NewOptions() *Options {
125
125
EnableStagedUpdateRunAPIs: true,
126
126
EnablePprof: false,
127
127
PprofPort: 6065,
128
-
ResourceSnapshotCreationInterval: 30*time.Second,
128
+
ResourceSnapshotCreationInterval: 1*time.Minute,
129
129
}
130
130
}
131
131
@@ -172,7 +172,7 @@ func (o *Options) AddFlags(flags *flag.FlagSet) {
172
172
flags.BoolVar(&o.EnablePprof, "enable-pprof", false, "If set, the pprof profiling is enabled.")
173
173
flags.IntVar(&o.PprofPort, "pprof-port", 6065, "The port for pprof profiling.")
174
174
flags.BoolVar(&o.DenyModifyMemberClusterLabels, "deny-modify-member-cluster-labels", false, "If set, users not in the system:masters cannot modify member cluster labels.")
175
-
flags.DurationVar(&o.ResourceSnapshotCreationInterval, "resource-snapshot-creation-interval", 30*time.Second, "The interval at which resource snapshots are created.")
175
+
flags.DurationVar(&o.ResourceSnapshotCreationInterval, "resource-snapshot-creation-interval", 1*time.Minute, "The interval at which resource snapshots are created.")
klog.ErrorS(controller.NewUnexpectedBehaviorError(err), "Failed to get the NextResourceSnapshotCandidateDetectionTimeAnnotation", "clusterResourceSnapshot", snapshotKObj)
611
+
}
612
+
// If the annoation is not set, set next resource snapshot candidate detection time is now.
klog.V(2).InfoS("Set the next-resource-snapshot-candidate-detection-time to now", "clusterResourceSnapshot", snapshotKObj, "nextResourceSnapshotCandidateDetectionTime", now)
// buildMasterClusterResourceSnapshot builds and returns the master cluster resource snapshot for the latest resource snapshot index and selected resources.
// ExtractNextResourceSnapshotCandidateDetectionTimeFromResourceSnapshot extracts the next resource snapshot candidate detection time from the annotations of a clusterResourceSnapshot.
104
+
// If the annotation does not exist, it returns 0 duration.
0 commit comments