Skip to content

Commit

Permalink
update interval to 10min for storage quota periodic sync
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbarge committed Oct 16, 2024
1 parent f98a445 commit 6fbdf59
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions manifests/supervisorcluster/1.28/cns-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ spec:
- "--leader-election-lease-duration=120s"
- "--leader-election-renew-deadline=60s"
- "--leader-election-retry-period=30s"
- "--storagequota-sync-interval=10m"
env:
- name: CLUSTER_FLAVOR
value: "WORKLOAD"
Expand Down
1 change: 1 addition & 0 deletions manifests/supervisorcluster/1.29/cns-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ spec:
- "--leader-election-lease-duration=120s"
- "--leader-election-renew-deadline=60s"
- "--leader-election-retry-period=30s"
- "--storagequota-sync-interval=10m"
env:
- name: CLUSTER_FLAVOR
value: "WORKLOAD"
Expand Down
2 changes: 1 addition & 1 deletion manifests/supervisorcluster/1.30/cns-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ spec:
- "--leader-election-lease-duration=120s"
- "--leader-election-renew-deadline=60s"
- "--leader-election-retry-period=30s"
- "--storagequota-sync-interval=30m"
- "--storagequota-sync-interval=10m"
env:
- name: CLUSTER_FLAVOR
value: "WORKLOAD"
Expand Down
6 changes: 5 additions & 1 deletion pkg/syncer/metadatasyncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,12 @@ func InitMetadataSyncer(ctx context.Context, clusterFlavor cnstypes.CnsClusterFl

func initStorageQuotaPeriodicSync(ctx context.Context, metadataSyncer *metadataSyncInformer) error {
log := logger.GetLogger(ctx).WithOptions()
if int(PeriodicSyncIntervalInMin.Minutes()) == 0 {
log.Info("initStorageQuotaPeriodicSync: sync interval is set to 0, " +
"will skip the Periodic Sync for storage quota")
return nil
}
// create storagequotaperiodicsync CR

log.Info("initStorageQuotaPeriodicSync: Initialize the storage quota periodic sync")
restConfig, err := config.GetConfig()
if err != nil {
Expand Down

0 comments on commit 6fbdf59

Please sign in to comment.