Skip to content

Commit 45da3fc

Browse files
authored
Merge pull request #101111 from tkashem/automated-cherry-pick-of-#100678-upstream-release-1.21
Automated cherry pick of #100678: apf: exempt probes /healthz /livez /readyz
2 parents 7ca1037 + 353bda5 commit 45da3fc

File tree

1 file changed

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

1 file changed

+14
-0
lines changed

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

+14
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var (
6464
}
6565
SuggestedFlowSchemas = []*flowcontrol.FlowSchema{
6666
SuggestedFlowSchemaSystemNodes, // references "system" priority-level
67+
SuggestedFlowSchemaProbes, // references "exempt" priority-level
6768
SuggestedFlowSchemaSystemLeaderElection, // references "leader-election" priority-level
6869
SuggestedFlowSchemaWorkloadLeaderElection, // references "leader-election" priority-level
6970
SuggestedFlowSchemaKubeControllerManager, // references "workload-high" priority-level
@@ -394,6 +395,19 @@ var (
394395
},
395396
},
396397
)
398+
// the following flow schema exempts probes
399+
SuggestedFlowSchemaProbes = newFlowSchema(
400+
"probes", "exempt", 2,
401+
"", // distinguisherMethodType
402+
flowcontrol.PolicyRulesWithSubjects{
403+
Subjects: groups(user.AllUnauthenticated, user.AllAuthenticated),
404+
NonResourceRules: []flowcontrol.NonResourcePolicyRule{
405+
nonResourceRule(
406+
[]string{"get"},
407+
[]string{"/healthz", "/readyz", "/livez"}),
408+
},
409+
},
410+
)
397411
)
398412

399413
func newPriorityLevelConfiguration(name string, spec flowcontrol.PriorityLevelConfigurationSpec) *flowcontrol.PriorityLevelConfiguration {

0 commit comments

Comments
 (0)