Skip to content

Commit 0ceca9a

Browse files
committed
address comments
Signed-off-by: Zhiying Lin <[email protected]>
1 parent 313687d commit 0ceca9a

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
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` | Max concurrent resourceChange reconcilers | `20` |
4141
| `logFileMaxSize` | Max log file size before rotation | `1000000` |
4242
| `MaxFleetSizeSupported` | Max number of member clusters supported | `100` |
43-
| `resourceSnapshotCreationInterval` | Interval for resource snapshot creation | `1m` |
43+
| `resourceSnapshotCreationInterval` | Interval for resource snapshot creation | `30s` |

charts/hub-agent/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ enableGuardRail: true
1818
webhookClientConnectionType: service
1919
forceDeleteWaitTime: 15m0s
2020
clusterUnhealthyThreshold: 3m0s
21-
resourceSnapshotCreationInterval: 1m0s
21+
resourceSnapshotCreationInterval: 30s
2222

2323
namespace:
2424
fleet-system

cmd/hubagent/options/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func NewOptions() *Options {
125125
EnableStagedUpdateRunAPIs: true,
126126
EnablePprof: false,
127127
PprofPort: 6065,
128-
ResourceSnapshotCreationInterval: 1 * time.Minute,
128+
ResourceSnapshotCreationInterval: 30 * time.Second,
129129
}
130130
}
131131

@@ -172,7 +172,7 @@ func (o *Options) AddFlags(flags *flag.FlagSet) {
172172
flags.BoolVar(&o.EnablePprof, "enable-pprof", false, "If set, the pprof profiling is enabled.")
173173
flags.IntVar(&o.PprofPort, "pprof-port", 6065, "The port for pprof profiling.")
174174
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", 1*time.Minute, "The interval at which resource snapshots are created.")
175+
flags.DurationVar(&o.ResourceSnapshotCreationInterval, "resource-snapshot-creation-interval", 30*time.Second, "The interval at which resource snapshots are created.")
176176

177177
o.RateLimiterOpts.AddFlags(flags)
178178
}

pkg/controllers/clusterresourceplacement/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ func (r *Reconciler) handleUpdate(ctx context.Context, crp *fleetv1beta1.Cluster
206206
createResourceSnapshotRes, latestResourceSnapshot, err := r.getOrCreateClusterResourceSnapshot(ctx, crp, envelopeObjCount,
207207
&fleetv1beta1.ResourceSnapshotSpec{SelectedResources: selectedResources}, int(revisionLimit))
208208
if err != nil {
209-
// We don't requeue the request here immediately so that placement can keep tracking the rollout status.
210209
return ctrl.Result{}, err
211210
}
211+
212+
// We don't requeue the request here immediately so that placement can keep tracking the rollout status.
212213
if createResourceSnapshotRes.Requeue {
213214
latestResourceSnapshotKObj := klog.KObj(latestResourceSnapshot)
214215
// We cannot create the resource snapshot immediately because of the resource snapshot creation interval.

0 commit comments

Comments
 (0)