Tweaked wording and added codenew example re health-for-strangers
This commit is contained in:
@@ -162,7 +162,7 @@ are built in and may not be overwritten:
|
|||||||
that only matches the `catch-all` FlowSchema will be rejected with an HTTP 429
|
that only matches the `catch-all` FlowSchema will be rejected with an HTTP 429
|
||||||
error.
|
error.
|
||||||
|
|
||||||
## Potentially interesting additional configuration
|
## Health check concurrency exemption
|
||||||
|
|
||||||
The suggested configuration gives no special treatment to the health
|
The suggested configuration gives no special treatment to the health
|
||||||
check requests on kube-apiservers from their local kubelets --- which
|
check requests on kube-apiservers from their local kubelets --- which
|
||||||
@@ -171,32 +171,21 @@ suggested config, these requests get assigned to the `global-default`
|
|||||||
FlowSchema and the corresponding `global-default` priority level,
|
FlowSchema and the corresponding `global-default` priority level,
|
||||||
where other traffic can crowd them out.
|
where other traffic can crowd them out.
|
||||||
|
|
||||||
Adding the following additional FlowSchema will cause those requests
|
If you add the following additional FlowSchema, this exempts those
|
||||||
to be exempt from limiting. Unfortunately, any hostile party could
|
requests from rate limiting.
|
||||||
submit requests matching this FlowSchema.
|
|
||||||
|
|
||||||
```yaml
|
{{< caution >}}
|
||||||
apiVersion: flowcontrol.apiserver.k8s.io/v1alpha1
|
|
||||||
kind: FlowSchema
|
Making this change also allows any hostile party to then send
|
||||||
metadata:
|
health-check requests that match this FlowSchema, at any volume they
|
||||||
name: health-for-strangers
|
like. If you have a web traffic filter or similar external security
|
||||||
spec:
|
mechanism to protect your cluster's API server from general internet
|
||||||
matchingPrecedence: 1000
|
traffic, you can configure rules to block any health check requests
|
||||||
priorityLevelConfiguration:
|
that originate from outside your cluster.
|
||||||
name: exempt
|
|
||||||
rules:
|
{{< /caution >}}
|
||||||
- nonResourceRules:
|
|
||||||
- nonResourceURLs:
|
{{< codenew file="priority-and-fairness/health-for-strangers.yaml" >}}
|
||||||
- "/healthz"
|
|
||||||
- "/livez"
|
|
||||||
- "/readyz"
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
subjects:
|
|
||||||
- kind: Group
|
|
||||||
group:
|
|
||||||
name: system:unauthenticated
|
|
||||||
```
|
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
The flow control API involves two kinds of resources.
|
The flow control API involves two kinds of resources.
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: flowcontrol.apiserver.k8s.io/v1alpha1
|
||||||
|
kind: FlowSchema
|
||||||
|
metadata:
|
||||||
|
name: health-for-strangers
|
||||||
|
spec:
|
||||||
|
matchingPrecedence: 1000
|
||||||
|
priorityLevelConfiguration:
|
||||||
|
name: exempt
|
||||||
|
rules:
|
||||||
|
- nonResourceRules:
|
||||||
|
- nonResourceURLs:
|
||||||
|
- "/healthz"
|
||||||
|
- "/livez"
|
||||||
|
- "/readyz"
|
||||||
|
verbs:
|
||||||
|
- "*"
|
||||||
|
subjects:
|
||||||
|
- kind: Group
|
||||||
|
group:
|
||||||
|
name: system:unauthenticated
|
||||||
Reference in New Issue
Block a user