"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pilot/pkg/serviceregistry/serviceentry/conversion.go" between
istio-1.10.0.tar.gz and istio-1.10.1.tar.gz

About: Istio is a platform-independent service mesh that provides a uniform way to connect, secure, control, and observe microservices.

conversion.go  (istio-1.10.0):conversion.go  (istio-1.10.1)
skipping to change at line 197 skipping to change at line 197
} }
hostAddresses = append(hostAddresses, &Ho stAddress{hostname, newAddress}) hostAddresses = append(hostAddresses, &Ho stAddress{hostname, newAddress})
} }
} }
} else { } else {
hostAddresses = append(hostAddresses, &HostAddress{hostna me, constants.UnspecifiedIP}) hostAddresses = append(hostAddresses, &HostAddress{hostna me, constants.UnspecifiedIP})
} }
} }
out = append(out, buildServices(hostAddresses, cfg.Namespace, svcPorts, s erviceEntry.Location, resolution, out = append(out, buildServices(hostAddresses, cfg.Namespace, svcPorts, s erviceEntry.Location, resolution,
exportTo, labelSelectors, serviceEntry.SubjectAltNames, creationT ime)...) exportTo, labelSelectors, serviceEntry.SubjectAltNames, creationT ime, cfg.Labels)...)
return out return out
} }
func buildServices(hostAddresses []*HostAddress, namespace string, ports model.P ortList, location networking.ServiceEntry_Location, func buildServices(hostAddresses []*HostAddress, namespace string, ports model.P ortList, location networking.ServiceEntry_Location,
resolution model.Resolution, exportTo map[visibility.Instance]bool, selec tors map[string]string, saccounts []string, resolution model.Resolution, exportTo map[visibility.Instance]bool, selec tors map[string]string, saccounts []string,
ctime time.Time) []*model.Service { ctime time.Time, labels map[string]string) []*model.Service {
out := make([]*model.Service, 0, len(hostAddresses)) out := make([]*model.Service, 0, len(hostAddresses))
for _, ha := range hostAddresses { for _, ha := range hostAddresses {
out = append(out, &model.Service{ out = append(out, &model.Service{
CreationTime: ctime, CreationTime: ctime,
MeshExternal: location == networking.ServiceEntry_MESH_EX TERNAL, MeshExternal: location == networking.ServiceEntry_MESH_EX TERNAL,
Hostname: host.Name(ha.host), Hostname: host.Name(ha.host),
Address: ha.address, Address: ha.address,
Ports: ports, Ports: ports,
Resolution: resolution, Resolution: resolution,
Attributes: model.ServiceAttributes{ Attributes: model.ServiceAttributes{
ServiceRegistry: string(serviceregistry.External) , ServiceRegistry: string(serviceregistry.External) ,
Name: ha.host, Name: ha.host,
Namespace: namespace, Namespace: namespace,
Labels: labels,
ExportTo: exportTo, ExportTo: exportTo,
LabelSelectors: selectors, LabelSelectors: selectors,
}, },
ServiceAccounts: saccounts, ServiceAccounts: saccounts,
}) })
} }
return out return out
} }
func convertEndpoint(service *model.Service, servicePort *networking.Port, func convertEndpoint(service *model.Service, servicePort *networking.Port,
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)