Merge pull request #46761 from yastij/syncService-remove-copy
Automatic merge from submit-queue (batch tested with PRs 48106, 46761) removing unnecessary shallow copy on SyncService **What this PR does / why we need it**: remove shallow copy + avoid using same index name as the nested loop **Which issue this PR fixes**: fixes #46703 **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
@@ -368,9 +368,7 @@ func (e *EndpointController) syncService(key string) error {
|
||||
|
||||
readyEps := 0
|
||||
notReadyEps := 0
|
||||
for i := range pods {
|
||||
// TODO: Do we need to copy here?
|
||||
pod := &(*pods[i])
|
||||
for _, pod := range pods {
|
||||
|
||||
for i := range service.Spec.Ports {
|
||||
servicePort := &service.Spec.Ports[i]
|
||||
|
Reference in New Issue
Block a user