File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -353,6 +353,12 @@ func (l *LoadBalancer) Reconcile(rOpts *ReconcileOptions) []error {
353
353
l .listeners = ltnrs
354
354
}
355
355
356
+ // Decide: Is this still needed?
357
+ for _ , listener := range l .listeners {
358
+ unusedTGs := listener .GetRules ().FindUnusedTGs (l .targetgroups )
359
+ unusedTGs .StripDesiredState ()
360
+ }
361
+
356
362
tgsOpts .IgnoreDeletes = false
357
363
tgs , err = l .targetgroups .Reconcile (tgsOpts )
358
364
if err != nil {
@@ -361,19 +367,6 @@ func (l *LoadBalancer) Reconcile(rOpts *ReconcileOptions) []error {
361
367
l .targetgroups = tgs
362
368
}
363
369
364
- // Decide: Is this still needed?
365
- // for _, listener := range l.listeners {
366
- // unusedTGs := listener.GetRules().FindUnusedTGs(l.targetgroups)
367
- // for _, t := range unusedTGs {
368
- // if err := albelbv2.ELBV2svc.RemoveTargetGroup(t.CurrentARN()); err != nil {
369
- // errors = append(errors, err)
370
- // continue
371
- // }
372
- // index, _ := l.targetgroups.FindById(t.ID)
373
- // l.targetgroups = append(l.targetgroups[:index], l.targetgroups[index+1:]...)
374
- // }
375
- // }
376
-
377
370
return errors
378
371
}
379
372
You can’t perform that action at this time.
0 commit comments