Merge pull request #2845 from brendandburns/proxy

Return an error if a user attempts to create an externalized UDP balancer
This commit is contained in:
bgrant0607 2014-12-11 08:09:09 -08:00
commit 09a160e27a

View File

@ -114,6 +114,10 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
if rs.cloud == nil {
return nil, fmt.Errorf("requested an external service, but no cloud provider supplied.")
}
if service.Spec.Protocol != api.ProtocolTCP {
// TODO: Support UDP here too.
return nil, fmt.Errorf("external load balancers for non TCP services are not currently supported.")
}
balancer, ok := rs.cloud.TCPLoadBalancer()
if !ok {
return nil, fmt.Errorf("the cloud provider does not support external TCP load balancers.")