From cfb24eeebce8e6c384322b0d197e5d2efa1b2ca4 Mon Sep 17 00:00:00 2001 From: "Johannes M. Scheuermann" Date: Thu, 8 Aug 2019 16:23:40 +0200 Subject: [PATCH] Update internal traffic shaping docs --- pkg/kubelet/dockershim/network/cni/cni.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/dockershim/network/cni/cni.go b/pkg/kubelet/dockershim/network/cni/cni.go index 81351dcaa5b..9a0a6740ffa 100644 --- a/pkg/kubelet/dockershim/network/cni/cni.go +++ b/pkg/kubelet/dockershim/network/cni/cni.go @@ -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 }