mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Update internal traffic shaping docs
This commit is contained in:
parent
cbdb20c10d
commit
cfb24eeebc
@ -87,12 +87,12 @@ type cniBandwidthEntry struct {
|
||||
// IngressRate is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If ingressRate is set, ingressBurst must also be set
|
||||
IngressRate int `json:"ingressRate,omitempty"`
|
||||
// IngressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If ingressBurst is set, ingressRate must also be set
|
||||
// NOTE: it's not used for now and default to 0.
|
||||
// NOTE: it's not used for now and defaults to 0. If IngressRate is set IngressBurst will be math.MaxInt32 ~ 2Gbit
|
||||
IngressBurst int `json:"ingressBurst,omitempty"`
|
||||
// EgressRate is the bandwidth is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If egressRate is set, egressBurst must also be set
|
||||
EgressRate int `json:"egressRate,omitempty"`
|
||||
// EgressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If egressBurst is set, egressRate must also be set
|
||||
// NOTE: it's not used for now and default to 0.
|
||||
// NOTE: it's not used for now and defaults to 0. If EgressRate is set EgressBurst will be math.MaxInt32 ~ 2Gbit
|
||||
EgressBurst int `json:"egressBurst,omitempty"`
|
||||
}
|
||||
|
||||
@ -409,11 +409,11 @@ func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string
|
||||
// https://github.com/containernetworking/plugins/blob/master/plugins/meta/bandwidth/README.md
|
||||
// Rates are in bits per second, burst values are in bits.
|
||||
bandwidthParam.IngressRate = int(ingress.Value())
|
||||
bandwidthParam.IngressBurst = math.MaxInt32 // no limit
|
||||
bandwidthParam.IngressBurst = math.MaxInt32 // limit to math.MaxInt32 ~ 2Gbit
|
||||
}
|
||||
if egress != nil {
|
||||
bandwidthParam.EgressRate = int(egress.Value())
|
||||
bandwidthParam.EgressBurst = math.MaxInt32 // no limit
|
||||
bandwidthParam.EgressBurst = math.MaxInt32 // limit to math.MaxInt32 ~ 2Gbit
|
||||
}
|
||||
rt.CapabilityArgs["bandwidth"] = bandwidthParam
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user