Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update interval to 10min for storage quota periodic sync #3081

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add RBAC changes as well to 1.28 and 1.29 files

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