Skip to content

Commit

Permalink
Rename function to be clearer
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Dorosh <kevin.dorosh@solo.io>
  • Loading branch information
Kevin Dorosh committed Jul 6, 2023
1 parent b632775 commit 04b7435
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pilot/pkg/serviceregistry/kube/controller/ambientindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ func (c *Controller) constructWorkload(pod *v1.Pod, waypoint *workloadapi.Gatewa
for _, podIP := range pod.Status.PodIPs {
addresses = append(addresses, parseIP(podIP.IP))
}
for nsName, ports := range getWorkloadServices(serviceEntries, nil, pod.GetNamespace(), pod.Labels) {
for nsName, ports := range getWorkloadServicesFromServiceEntries(serviceEntries, nil, pod.GetNamespace(), pod.Labels) {
workloadServices[nsName] = ports
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (c *Controller) constructWorkloadFromWorkloadEntry(workloadEntry *v1alpha3.

// for constructing a workload from a standalone workload entry, which can be selected by many service entries
if parentServiceEntry == nil {
for nsName, ports := range getWorkloadServices(serviceEntries, workloadEntry, workloadEntryNamespace, workloadEntry.Labels) {
for nsName, ports := range getWorkloadServicesFromServiceEntries(serviceEntries, workloadEntry, workloadEntryNamespace, workloadEntry.Labels) {
workloadServices[nsName] = ports
}
}
Expand Down Expand Up @@ -531,7 +531,7 @@ func (a *AmbientIndexImpl) cleanupOldWorkloadEntriesInlinedOnServiceEntry(svc *m
}
}

func getWorkloadServices(serviceEntries map[types.NamespacedName]*model.Service, workloadEntry *v1alpha3.WorkloadEntry,
func getWorkloadServicesFromServiceEntries(serviceEntries map[types.NamespacedName]*model.Service, workloadEntry *v1alpha3.WorkloadEntry,
workloadNamespace string, workloadLabels map[string]string,
) map[string]*workloadapi.PortList {
workloadServices := map[string]*workloadapi.PortList{}
Expand Down

0 comments on commit 04b7435

Please sign in to comment.