Add ExternalName to ServiceSpec
ExternalName allows kubedns to return CNAME records for external services. No proxying is involved. See original issue at https://github.com/kubernetes/kubernetes/issues/13748 Feature tracking at https://github.com/kubernetes/features/issues/33
This commit is contained in:
@@ -222,6 +222,10 @@ func IsServiceIPSet(service *Service) bool {
|
||||
|
||||
// this function aims to check if the service's cluster IP is requested or not
|
||||
func IsServiceIPRequested(service *Service) bool {
|
||||
// ExternalName services are CNAME aliases to external ones. Ignore the IP.
|
||||
if service.Spec.Type == ServiceTypeExternalName {
|
||||
return false
|
||||
}
|
||||
return service.Spec.ClusterIP == ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user