plugin/kubernetes: Add support for dual stack ClusterIP Services (#4339)
* support dual stack clusterIPs Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * stickler Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix ClusterIPs make Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
parent
302434e392
commit
51c05679e6
14 changed files with 204 additions and 111 deletions
|
@ -200,11 +200,13 @@ func svcIPIndexFunc(obj interface{}) ([]string, error) {
|
|||
if !ok {
|
||||
return nil, errObj
|
||||
}
|
||||
idx := make([]string, len(svc.ClusterIPs)+len(svc.ExternalIPs))
|
||||
copy(idx, svc.ClusterIPs)
|
||||
if len(svc.ExternalIPs) == 0 {
|
||||
return []string{svc.ClusterIP}, nil
|
||||
return idx, nil
|
||||
}
|
||||
|
||||
return append([]string{svc.ClusterIP}, svc.ExternalIPs...), nil
|
||||
copy(idx[len(svc.ClusterIPs):], svc.ExternalIPs)
|
||||
return idx, nil
|
||||
}
|
||||
|
||||
func svcNameNamespaceIndexFunc(obj interface{}) ([]string, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue