diff --git a/content/docs/main/docs/api-reference.html b/content/docs/main/docs/api-reference.html index 15d0e19d..bca07eee 100644 --- a/content/docs/main/docs/api-reference.html +++ b/content/docs/main/docs/api-reference.html @@ -10049,6 +10049,19 @@

Egress Cannot be set with ExternalIPPool.

+ + +bandwidth
+ + +Bandwidth + + + + +

Bandwidth specifies the rate limit of north-south egress traffic of this Egress.

+ + @@ -10941,6 +10954,46 @@

AppliedTo +

Bandwidth +

+

+(Appears on: +EgressSpec) +

+

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+rate
+ +string + +
+

Rate specifies the maximum traffic rate. e.g. 300k, 10M

+
+burst
+ +string + +
+

Burst specifies the maximum burst size when traffic exceeds the rate. e.g. 300k, 10M

+

ClusterGroupReference (string alias)

@@ -11358,6 +11411,19 @@

EgressSpec Cannot be set with ExternalIPPool.

+ + +bandwidth
+ + +Bandwidth + + + + +

Bandwidth specifies the rate limit of north-south egress traffic of this Egress.

+ +

EgressStatus @@ -14508,5 +14574,5 @@

BundleStatus

Generated with gen-crd-api-reference-docs -on git commit d66de44. +on git commit ffc6495.

diff --git a/content/docs/main/docs/egress.md b/content/docs/main/docs/egress.md index 447c9c42..b0babd16 100644 --- a/content/docs/main/docs/egress.md +++ b/content/docs/main/docs/egress.md @@ -9,6 +9,7 @@ - [AppliedTo](#appliedto) - [EgressIP](#egressip) - [ExternalIPPool](#externalippool) + - [Bandwidth](#bandwidth) - [The ExternalIPPool resource](#the-externalippool-resource) - [IPRanges](#ipranges) - [NodeSelector](#nodeselector) @@ -127,6 +128,46 @@ The `externalIPPool` field specifies the name of the `ExternalIPPool` that the be assigned to. It can be empty, which means users should assign the `egressIP` to one Node manually. +### Bandwidth + +The `bandwidth` field enables traffic shaping for an Egress, by limiting the +bandwidth for all egress traffic belonging to this Egress. `rate` specifies +the maximum transmission rate. `burst` specifies the maximum burst size when +traffic exceeds the rate. The user-provided values for `rate` and `burst` must +follow the Kubernetes [Quantity](https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/) format, +e.g. 300k, 100M, 2G. All backend workloads selected by a rate-limited Egress share the +same bandwidth while sending egress traffic via this Egress. If these limits are exceeded, +the traffic will be dropped. + +**Note**: Traffic shaping is currently in alpha version. To use this feature, users should +enable the `EgressTrafficShaping` feature gate. Each Egress IP can be applied one bandwidth only. +If multiple Egresses use the same IP but configure different bandwidths, the effective +bandwidth will be selected randomly from the set of configured bandwidths. The effective use of the `bandwidth` +function requires the OVS datapath to support meters. + +An Egress with traffic shaping example: + +```yaml +apiVersion: crd.antrea.io/v1beta1 +kind: Egress +metadata: + name: egress-prod-web +spec: + appliedTo: + namespaceSelector: + matchLabels: + env: prod + podSelector: + matchLabels: + role: web + egressIP: 10.10.0.8 + bandwidth: + rate: 800M + burst: 2G +status: + egressNode: node01 +``` + ## The ExternalIPPool resource ExternalIPPool defines one or multiple IP ranges that can be used in the diff --git a/content/docs/main/docs/feature-gates.md b/content/docs/main/docs/feature-gates.md index ba98e114..bec2c838 100644 --- a/content/docs/main/docs/feature-gates.md +++ b/content/docs/main/docs/feature-gates.md @@ -55,6 +55,7 @@ edit the Agent configuration in the | `SupportBundleCollection` | Agent + Controller | `false` | Alpha | v1.10 | N/A | N/A | Yes | | | `L7NetworkPolicy` | Agent + Controller | `false` | Alpha | v1.10 | N/A | N/A | Yes | | | `AdminNetworkPolicy` | Controller | `false` | Alpha | v1.13 | N/A | N/A | Yes | | +| `EgressTrafficShaping` | Agent | `false` | Alpha | v1.14 | N/A | N/A | Yes | OVS meters should be supported | ## Description and Requirements of Features @@ -402,3 +403,13 @@ this [document](antrea-l7-network-policy.md#prerequisites) for more information The `AdminNetworkPolicy` API (which currently includes the AdminNetworkPolicy and BaselineAdminNetworkPolicy objects) complements the Antrea-native policies and help cluster administrators to set security postures in a portable manner. + +### EgressTrafficShaping + +The `EgressTrafficShaping` feature gate of Antrea Agent enables traffic shaping of Egress, which could limit the +bandwidth for all egress traffic belonging to an Egress. Refer to this [document](egress.md#trafficshaping) + +#### Requirements for this Feature + +This feature leverages OVS meters to do the actual rate-limiting, therefore this feature requires OVS meters +to be supported in the datapath.