Skip to content

Commit

Permalink
remove loop workaround after upgrade go
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Mar 12, 2024
1 parent 52de9e9 commit a1a4016
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,25 +105,21 @@ func (ctrl *Controller) Watch() {
func (ctrl *Controller) preloadResources(ctx context.Context) {
ingresses, _ := k8s.GetIngresses(ctx, ctrl.watchNamespace)
for _, i := range ingresses {
i := i
ctrl.watchedIngresses.Store(i.Namespace+"/"+i.Name, &i)
}

services, _ := k8s.GetServices(ctx, ctrl.watchNamespace)
for _, s := range services {
s := s
ctrl.watchedServices.Store(s.Namespace+"/"+s.Name, &s)
}

secrets, _ := k8s.GetSecrets(ctx, ctrl.watchNamespace)
for _, s := range secrets {
s := s
ctrl.watchedSecrets.Store(s.Namespace+"/"+s.Name, &s)
}

endpoints, _ := k8s.GetEndpoints(ctx, ctrl.watchNamespace)
for _, e := range endpoints {
e := e
ctrl.watchedEndpoints.Store(e.Namespace+"/"+e.Name, &e)
}
}
Expand Down

0 comments on commit a1a4016

Please sign in to comment.