Skip to content

Commit

Permalink
traffic rate for multus nic
Browse files Browse the repository at this point in the history
traffic rate for multus nic
  • Loading branch information
fanriming committed May 12, 2021
1 parent a1ae937 commit 28cf4cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/daemon/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func (csh cniServerHandler) handleAdd(req *restful.Request, resp *restful.Respon
cidr = pod.Annotations[fmt.Sprintf(util.CidrAnnotationTemplate, podRequest.Provider)]
gw = pod.Annotations[fmt.Sprintf(util.GatewayAnnotationTemplate, podRequest.Provider)]
subnet = pod.Annotations[fmt.Sprintf(util.LogicalSwitchAnnotationTemplate, podRequest.Provider)]
ingress = pod.Annotations[util.IngressRateAnnotation]
egress = pod.Annotations[util.EgressRateAnnotation]
ingress = pod.Annotations[fmt.Sprintf(util.IngressRateAnnotationTemplate, podRequest.Provider)]
egress = pod.Annotations[fmt.Sprintf(util.EgressRateAnnotationTemplate, podRequest.Provider)]
vlanID = pod.Annotations[fmt.Sprintf(util.VlanIdAnnotationTemplate, podRequest.Provider)]
ipAddr = util.GetIpAddrWithMask(ip, cidr)
ifName = podRequest.IfName
Expand Down
2 changes: 2 additions & 0 deletions pkg/util/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
VlanIdAnnotationTemplate = "%s.kubernetes.io/vlan_id"
VlanRangeAnnotationTemplate = "%s.kubernetes.io/vlan_range"
NetworkTypeTemplate = "%s.kubernetes.io/network_types"
IngressRateAnnotationTemplate = "%s.ovn.kubernetes.io/ingress_rate"
EgressRateAnnotationTemplate = "%s.ovn.kubernetes.io/egress_rate"

ExcludeIpsAnnotation = "ovn.kubernetes.io/exclude_ips"

Expand Down

0 comments on commit 28cf4cc

Please sign in to comment.