"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pilot/pkg/serviceregistry/kube/controller/controller.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.

controller.go  (istio-1.10.0):controller.go  (istio-1.10.1)
skipping to change at line 796 skipping to change at line 796
} }
func (c *Controller) serviceInstancesFromWorkloadInstances(svc *model.Service, r eqSvcPort int) []*model.ServiceInstance { func (c *Controller) serviceInstancesFromWorkloadInstances(svc *model.Service, r eqSvcPort int) []*model.ServiceInstance {
// Run through all the workload instances, select ones that match the ser vice labels // Run through all the workload instances, select ones that match the ser vice labels
// only if this is a kubernetes internal service and of ClientSideLB (eds ) type // only if this is a kubernetes internal service and of ClientSideLB (eds ) type
// as InstancesByPort is called by the aggregate controller. We dont want to include // as InstancesByPort is called by the aggregate controller. We dont want to include
// workload instances for any other registry // workload instances for any other registry
var workloadInstancesExist bool var workloadInstancesExist bool
c.RLock() c.RLock()
workloadInstancesExist = len(c.workloadInstancesByIP) > 0 workloadInstancesExist = len(c.workloadInstancesByIP) > 0
_, inRegistry := c.servicesMap[svc.Hostname]
c.RUnlock() c.RUnlock()
// Only select internal Kubernetes services with selectors // Only select internal Kubernetes services with selectors
if !workloadInstancesExist || svc.Attributes.ServiceRegistry != string(se rviceregistry.Kubernetes) || if !inRegistry || !workloadInstancesExist || svc.Attributes.ServiceRegist ry != string(serviceregistry.Kubernetes) ||
svc.MeshExternal || svc.Resolution != model.ClientSideLB || svc.A ttributes.LabelSelectors == nil { svc.MeshExternal || svc.Resolution != model.ClientSideLB || svc.A ttributes.LabelSelectors == nil {
return nil return nil
} }
selector := labels.Instance(svc.Attributes.LabelSelectors) selector := labels.Instance(svc.Attributes.LabelSelectors)
// Get the service port name and target port so that we can construct the service instance // Get the service port name and target port so that we can construct the service instance
k8sService, err := c.serviceLister.Services(svc.Attributes.Namespace).Get (svc.Attributes.Name) k8sService, err := c.serviceLister.Services(svc.Attributes.Namespace).Get (svc.Attributes.Name)
// We did not find the k8s service. We cannot get the targetPort // We did not find the k8s service. We cannot get the targetPort
if err != nil { if err != nil {
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

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