Skip to content

Commit

Permalink
apf: exempt probes /healthz /livez /readyz
Browse files Browse the repository at this point in the history
  • Loading branch information
tkashem committed Apr 14, 2021
1 parent 1484454 commit 5ec5885
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -64,6 +64,7 @@ var (
}
SuggestedFlowSchemas = []*flowcontrol.FlowSchema{
SuggestedFlowSchemaSystemNodes, // references "system" priority-level
SuggestedFlowSchemaProbes, // references "exempt" priority-level
SuggestedFlowSchemaSystemLeaderElection, // references "leader-election" priority-level
SuggestedFlowSchemaWorkloadLeaderElection, // references "leader-election" priority-level
SuggestedFlowSchemaKubeControllerManager, // references "workload-high" priority-level
Expand Down Expand Up @@ -394,6 +395,19 @@ var (
},
},
)
// the following flow schema exempts probes
SuggestedFlowSchemaProbes = newFlowSchema(
"probes", "exempt", 2,
"", // distinguisherMethodType
flowcontrol.PolicyRulesWithSubjects{
Subjects: groups(user.AllUnauthenticated, user.AllAuthenticated),
NonResourceRules: []flowcontrol.NonResourcePolicyRule{
nonResourceRule(
[]string{"get"},
[]string{"/healthz", "/readyz", "/livez"}),
},
},
)
)

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

0 comments on commit 5ec5885

Please sign in to comment.