code: func RequestsOnlyLocalTraffic(service *api.Service) bool {
  	if service.Spec.Type != api.ServiceTypeLoadBalancer &&
  		service.Spec.Type != api.ServiceTypeNodePort {
  		return false
  	}
  
  	return service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyTypeLocal
  }
docs: // RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.