diff --git a/pkg/controller/pod.go b/pkg/controller/pod.go index 26a156a3d12..0fd06687eb6 100644 --- a/pkg/controller/pod.go +++ b/pkg/controller/pod.go @@ -1448,6 +1448,9 @@ func (c *Controller) acquireAddress(pod *v1.Pod, podNet *kubeovnNet) (string, st ipPool = strings.Split(pod.Annotations[fmt.Sprintf(util.IpPoolAnnotationTemplate, podNet.ProviderName)], ";") } else { ipPool = strings.Split(pod.Annotations[fmt.Sprintf(util.IpPoolAnnotationTemplate, podNet.ProviderName)], ",") + if len(ipPool) == 2 && util.CheckProtocol(ipPool[0]) != util.CheckProtocol(ipPool[1]) { + ipPool = []string{pod.Annotations[fmt.Sprintf(util.IpPoolAnnotationTemplate, podNet.ProviderName)]} + } } for i, ip := range ipPool { ipPool[i] = strings.TrimSpace(ip)