Skip to content

Commit d2eb06a

Browse files
committed
update after review
Signed-off-by: lou <[email protected]>
1 parent 8ebd758 commit d2eb06a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

pkg/synchromanager/clustersynchro/resource_negotiator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// excludedInternalResources is a list of internal resources that are not synchronized
25-
// if the feature gate SkipSyncInternalResources is enabled.
25+
// if the feature gate SkipSyncLeases is enabled.
2626
var excludedInternalResources = sets.NewString(
2727
"leases.coordination.k8s.io",
2828
)
@@ -94,7 +94,7 @@ func (negotiator *ResourceNegotiator) NegotiateSyncResources(syncResources []clu
9494
for _, resource := range groupResources.Resources {
9595
syncGR := schema.GroupResource{Group: groupResources.Group, Resource: resource}
9696

97-
if clusterpediafeature.FeatureGate.Enabled(features.SkipSyncInternalResources) {
97+
if clusterpediafeature.FeatureGate.Enabled(features.SkipSyncLeases) {
9898
// skip internal resources
9999
if excludedInternalResources.Has(syncGR.String()) {
100100
klog.InfoS("Skip resource sync", "cluster", negotiator.name, "resource", resource, "reason", "internal resource")

pkg/synchromanager/features/features.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,19 @@ const (
5555
// alpha: v0.8.0
5656
ForcePaginatedListForResourceSync featuregate.Feature = "ForcePaginatedListForResourceSync"
5757

58-
// StreamHandlePaginatedListForResourceSync is a featuSkipSyncInternalResourcese gate for ResourceSync's reflector to handle echo paginated resources,
58+
// StreamHandlePaginatedListForResourceSync is a feature gate for ResourceSync's reflector to handle echo paginated resources,
5959
// resources within a pager will be processed as soon as possible instead of waiting until all resources are pulled before calling the ResourceHandler.
6060
//
6161
// owner: @iceber
6262
// alpha: v0.8.0
6363
StreamHandlePaginatedListForResourceSync featuregate.Feature = "StreamHandlePaginatedListForResourceSync"
6464

65-
// SkipSyncInternalResources is a feature gate for the ClusterSynchro to skip syncing some internal resources,
65+
// SkipSyncLeases is a feature gate for the ClusterSynchro to skip syncing leases.coordination.k8s.io,
6666
// if you enable this feature, these resources will not be synced no matter what `syncResources` are defined.
67-
// Currently, the following resources are skipped: leases.coordination.k8s.io
6867
//
6968
// owner: @27149chen
7069
// alpha: v0.8.0
71-
SkipSyncInternalResources featuregate.Feature = "SkipSyncInternalResources"
70+
SkipSyncLeases featuregate.Feature = "SkipSyncLeases"
7271
)
7372

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

8786
ForcePaginatedListForResourceSync: {Default: false, PreRelease: featuregate.Alpha},
8887
StreamHandlePaginatedListForResourceSync: {Default: false, PreRelease: featuregate.Alpha},
89-
SkipSyncInternalResources: {Default: false, PreRelease: featuregate.Alpha},
88+
SkipSyncLeases: {Default: false, PreRelease: featuregate.Alpha},
9089
}

0 commit comments

Comments
 (0)