Skip to content

Commit 27de9a8

Browse files
authored
Merge pull request kubernetes#131215 from tosi3k/cleanup-leader-election
Remove FlowSchemas handling non-leases-backed leader election
2 parents a9c75b0 + 2800c16 commit 27de9a8

File tree

1 file changed

+0
-48
lines changed
  • staging/src/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap

1 file changed

+0
-48
lines changed

staging/src/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ var (
7373
SuggestedFlowSchemaSystemNodeHigh, // references "node-high" priority-level
7474
SuggestedFlowSchemaProbes, // references "exempt" priority-level
7575
SuggestedFlowSchemaSystemLeaderElection, // references "leader-election" priority-level
76-
SuggestedFlowSchemaWorkloadLeaderElection, // references "leader-election" priority-level
77-
SuggestedFlowSchemaEndpointsController, // references "workload-high" priority-level
7876
SuggestedFlowSchemaKubeControllerManager, // references "workload-high" priority-level
7977
SuggestedFlowSchemaKubeScheduler, // references "workload-high" priority-level
8078
SuggestedFlowSchemaKubeSystemServiceAccounts, // references "workload-high" priority-level
@@ -310,52 +308,6 @@ var (
310308
},
311309
},
312310
)
313-
// We add an explicit rule for endpoint-controller with high precedence
314-
// to ensure that those calls won't get caught by the following
315-
// <workload-leader-election> flow-schema.
316-
//
317-
// TODO(#80289): Get rid of this rule once we get rid of support for
318-
// using endpoints and configmaps objects for leader election.
319-
SuggestedFlowSchemaEndpointsController = newFlowSchema(
320-
"endpoint-controller", "workload-high", 150,
321-
flowcontrol.FlowDistinguisherMethodByUserType,
322-
flowcontrol.PolicyRulesWithSubjects{
323-
Subjects: append(
324-
users(user.KubeControllerManager),
325-
kubeSystemServiceAccount("endpoint-controller", "endpointslicemirroring-controller")...),
326-
ResourceRules: []flowcontrol.ResourcePolicyRule{
327-
resourceRule(
328-
[]string{"get", "create", "update"},
329-
[]string{corev1.GroupName},
330-
[]string{"endpoints"},
331-
[]string{flowcontrol.NamespaceEvery},
332-
false),
333-
},
334-
},
335-
)
336-
// TODO(#80289): Get rid of this rule once we get rid of support for
337-
// using endpoints and configmaps objects for leader election.
338-
SuggestedFlowSchemaWorkloadLeaderElection = newFlowSchema(
339-
"workload-leader-election", "leader-election", 200,
340-
flowcontrol.FlowDistinguisherMethodByUserType,
341-
flowcontrol.PolicyRulesWithSubjects{
342-
Subjects: kubeSystemServiceAccount(flowcontrol.NameAll),
343-
ResourceRules: []flowcontrol.ResourcePolicyRule{
344-
resourceRule(
345-
[]string{"get", "create", "update"},
346-
[]string{corev1.GroupName},
347-
[]string{"endpoints", "configmaps"},
348-
[]string{flowcontrol.NamespaceEvery},
349-
false),
350-
resourceRule(
351-
[]string{"get", "create", "update"},
352-
[]string{coordinationv1.GroupName},
353-
[]string{"leases"},
354-
[]string{flowcontrol.NamespaceEvery},
355-
false),
356-
},
357-
},
358-
)
359311
SuggestedFlowSchemaSystemNodeHigh = newFlowSchema(
360312
"system-node-high", "node-high", 400,
361313
flowcontrol.FlowDistinguisherMethodByUserType,

0 commit comments

Comments
 (0)