func legacyEndpointsFromMateService(svc *v1.Service) []*endpoint.Endpoint {
	var endpoints []*endpoint.Endpoint

	// Get the desired hostname of the service from the annotation.
	hostname, exists := svc.Annotations[mateAnnotationKey]
	if !exists {
		return nil
	}

	// Create a corresponding endpoint for each configured external entrypoint.
	for _, lb := range svc.Status.LoadBalancer.Ingress {
		if lb.IP != "" {
			endpoints = append(endpoints, endpoint.NewEndpoint(hostname, endpoint.RecordTypeA, lb.IP))
		}
		if lb.Hostname != "" {
			endpoints = append(endpoints, endpoint.NewEndpoint(hostname, endpoint.RecordTypeCNAME, lb.Hostname))
		}
	}

	return endpoints
}
func legacyEndpointsFromMateService(svc *v1.Service) []*endpoint.Endpoint {
	var endpoints []*endpoint.Endpoint

	
	hostname, exists := svc.Annotations[mateAnnotationKey]
	if !exists {
		return nil
	}

	
	for _, lb := range svc.Status.LoadBalancer.Ingress {
		if lb.IP != "" {
			endpoints = append(endpoints, endpoint.NewEndpoint(hostname, endpoint.RecordTypeA, lb.IP))
		}
		if lb.Hostname != "" {
			endpoints = append(endpoints, endpoint.NewEndpoint(hostname, endpoint.RecordTypeCNAME, lb.Hostname))
		}
	}

	return endpoints
}
func legacyEndpointsFromMateService ( svc * v1 . Service ) [ ] * endpoint . Endpoint { var endpoints [ ] * endpoint . Endpoint // Get the desired hostname of the service from the annotation. hostname , exists := svc . Annotations [ mateAnnotationKey ] if ! exists { return nil } // Create a corresponding endpoint for each configured external entrypoint. for _ , lb := range svc . Status . LoadBalancer . Ingress { if lb . IP != " " { endpoints = append ( endpoints , endpoint . NewEndpoint ( hostname , endpoint . RecordTypeA , lb . IP ) ) } if lb . Hostname != " " { endpoints = append ( endpoints , endpoint . NewEndpoint ( hostname , endpoint . RecordTypeCNAME , lb . Hostname ) ) } } return endpoints }
// legacyEndpointsFromMateService tries to retrieve Endpoints from Services
// annotated with Mate's annotation semantics.
legacyEndpointsFromMateService tries to retrieve Endpoints from Services annotated with Mate s annotation semantics .