Skip to content

Commit

Permalink
modify lb-svc dnat port error (#2927)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Jun 13, 2023
1 parent d15f003 commit 9485980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/service_lb.go
Expand Up @@ -321,7 +321,7 @@ func (c *Controller) updatePodAttachNets(pod *corev1.Pod, svc *corev1.Service) e
}

var rules []string
rules = append(rules, fmt.Sprintf("%s,%d,%s,%s,%d,%s", loadBalancerIP, port.Port, protocol, svc.Spec.ClusterIP, port.TargetPort.IntVal, defaultGateway))
rules = append(rules, fmt.Sprintf("%s,%d,%s,%s,%d,%s", loadBalancerIP, port.Port, protocol, svc.Spec.ClusterIP, port.Port, defaultGateway))
klog.Infof("add dnat rules for lb svc pod, %v", rules)
if err := c.execNatRules(pod, POD_DNAT_ADD, rules); err != nil {
klog.Errorf("failed to add dnat for pod, err: %v", err)
Expand Down

0 comments on commit 9485980

Please sign in to comment.