mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user