Svc REST: clean up defaultOnRead to be consistent
Headless+selectorless -> RequireDualStack Headless+selector -> SingleStack Add test cases to cover this and ExternalName and dual-stack init (which I think can never trigger, but best to be safe).
This commit is contained in:
@@ -117,7 +117,7 @@ func MakeServicePort(name string, port int, tgtPort intstr.IntOrString, proto ap
|
||||
// SetHeadless sets the service as headless and clears other fields.
|
||||
func SetHeadless(svc *api.Service) {
|
||||
SetTypeClusterIP(svc)
|
||||
svc.Spec.ClusterIP = api.ClusterIPNone
|
||||
SetClusterIPs(api.ClusterIPNone)(svc)
|
||||
}
|
||||
|
||||
// SetSelector sets the service selector.
|
||||
|
Reference in New Issue
Block a user