Commit c30f5e1d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents fd884b7e b8781473
...@@ -368,9 +368,7 @@ func (e *EndpointController) syncService(key string) error { ...@@ -368,9 +368,7 @@ func (e *EndpointController) syncService(key string) error {
readyEps := 0 readyEps := 0
notReadyEps := 0 notReadyEps := 0
for i := range pods { for _, pod := range pods {
// TODO: Do we need to copy here?
pod := &(*pods[i])
for i := range service.Spec.Ports { for i := range service.Spec.Ports {
servicePort := &service.Spec.Ports[i] servicePort := &service.Spec.Ports[i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment