Correct Egress limits and remove unnecessary check

Signed-off-by: Johannes M. Scheuermann <joh.scheuer@gmail.com>
This commit is contained in:
Johannes M. Scheuermann 2019-05-30 11:44:05 +02:00
parent 4f0948eed5
commit 5e2e7c6f7d

View File

@ -581,10 +581,6 @@ func toCNIBandWidth(annotations map[string]string) (*cni.BandWidth, error) {
bandWidth := &cni.BandWidth{}
if ingress == nil && egress == nil {
return bandWidth, nil
}
if ingress != nil {
bandWidth.IngressRate = uint64(ingress.Value())
bandWidth.IngressBurst = math.MaxUint32
@ -592,7 +588,7 @@ func toCNIBandWidth(annotations map[string]string) (*cni.BandWidth, error) {
if egress != nil {
bandWidth.EgressRate = uint64(egress.Value())
bandWidth.EgressRate = math.MaxUint32
bandWidth.EgressBurst = math.MaxUint32
}
return bandWidth, nil