Skip to content

Commit

Permalink
Merge pull request #622 from 27149chen/update-featuregate-name
Browse files Browse the repository at this point in the history
featureGate: IgnoreLeaseSync => IgnoreSyncLease
  • Loading branch information
Iceber authored Dec 21, 2023
2 parents 392400d + aef84ab commit 0487c80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/synchromanager/clustersynchro/resource_negotiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (negotiator *ResourceNegotiator) NegotiateSyncResources(syncResources []clu
for _, resource := range groupResources.Resources {
syncGR := schema.GroupResource{Group: groupResources.Group, Resource: resource}

if clusterpediafeature.FeatureGate.Enabled(features.IgnoreLeaseSync) {
if clusterpediafeature.FeatureGate.Enabled(features.IgnoreSyncLease) {
// skip leases.coordination.k8s.io
if syncGR.String() == "leases.coordination.k8s.io" {
continue
Expand Down
6 changes: 3 additions & 3 deletions pkg/synchromanager/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const (
// alpha: v0.8.0
StreamHandlePaginatedListForResourceSync featuregate.Feature = "StreamHandlePaginatedListForResourceSync"

// IgnoreLeaseSync is a feature gate for the ClusterSynchro to skip syncing leases.coordination.k8s.io,
// IgnoreSyncLease is a feature gate for the ClusterSynchro to skip syncing leases.coordination.k8s.io,
// if you enable this feature, these resources will not be synced no matter what `syncResources` are defined.
//
// owner: @27149chen
// alpha: v0.8.0
IgnoreLeaseSync featuregate.Feature = "IgnoreLeaseSync"
IgnoreSyncLease featuregate.Feature = "IgnoreSyncLease"
)

func init() {
Expand All @@ -85,5 +85,5 @@ var defaultClusterSynchroManagerFeatureGates = map[featuregate.Feature]featurega

ForcePaginatedListForResourceSync: {Default: false, PreRelease: featuregate.Alpha},
StreamHandlePaginatedListForResourceSync: {Default: false, PreRelease: featuregate.Alpha},
IgnoreLeaseSync: {Default: false, PreRelease: featuregate.Alpha},
IgnoreSyncLease: {Default: false, PreRelease: featuregate.Alpha},
}

0 comments on commit 0487c80

Please sign in to comment.