File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ func (negotiator *ResourceNegotiator) NegotiateSyncResources(syncResources []clu
87
87
for _ , groupResources := range syncResources {
88
88
for _ , resource := range groupResources .Resources {
89
89
syncGR := schema.GroupResource {Group : groupResources .Group , Resource : resource }
90
+
91
+ if clusterpediafeature .FeatureGate .Enabled (features .IgnoreLeaseSync ) {
92
+ // skip leases.coordination.k8s.io
93
+ if syncGR .String () == "leases.coordination.k8s.io" {
94
+ continue
95
+ }
96
+ }
97
+
90
98
apiResource , supportedVersions := negotiator .dynamicDiscovery .GetAPIResourceAndVersions (syncGR )
91
99
if apiResource == nil || len (supportedVersions ) == 0 {
92
100
continue
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ const (
45
45
// owner: @iceber
46
46
// alpha: v0.6.0
47
47
HealthCheckerWithStandaloneTCP featuregate.Feature = "HealthCheckerWithStandaloneTCP"
48
+
49
+ // IgnoreLeaseSync is a feature gate for the ClusterSynchro to skip syncing leases.coordination.k8s.io,
50
+ // if you enable this feature, these resources will not be synced no matter what `syncResources` are defined.
51
+ //
52
+ // owner: @27149chen
53
+ // alpha: v0.8.0
54
+ IgnoreLeaseSync featuregate.Feature = "IgnoreLeaseSync"
48
55
)
49
56
50
57
func init () {
@@ -59,4 +66,5 @@ var defaultClusterSynchroManagerFeatureGates = map[featuregate.Feature]featurega
59
66
AllowSyncAllCustomResources : {Default : false , PreRelease : featuregate .Alpha },
60
67
AllowSyncAllResources : {Default : false , PreRelease : featuregate .Alpha },
61
68
HealthCheckerWithStandaloneTCP : {Default : false , PreRelease : featuregate .Alpha },
69
+ IgnoreLeaseSync : {Default : false , PreRelease : featuregate .Alpha },
62
70
}
You can’t perform that action at this time.
0 commit comments