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:
Rudi Chiarito
2016-08-19 09:09:14 -07:00
parent b6d4462f01
commit 88fdb96bfb
15 changed files with 23107 additions and 22831 deletions

View File

@@ -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 == ""
}