mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
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:
commit
c30f5e1d3c
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user