@@ -137,8 +137,18 @@ func (l *Listener) Reconcile(rOpts *ReconcileOptions) error {
137
137
return err
138
138
}
139
139
rOpts .Eventf (api .EventTypeNormal , "MODIFY" , "%v listener modified" , * l .ls .current .Port )
140
+ }
140
141
141
- default :
142
+ if l .ls .current != nil {
143
+ if rs , err := l .rules .Reconcile (& rs.ReconcileOptions {
144
+ Eventf : rOpts .Eventf ,
145
+ ListenerArn : l .ls .current .ListenerArn ,
146
+ TargetGroups : rOpts .TargetGroups ,
147
+ }); err != nil {
148
+ return err
149
+ } else {
150
+ l .rules = rs
151
+ }
142
152
}
143
153
144
154
return nil
@@ -199,8 +209,7 @@ func (l *Listener) modify(rOpts *ReconcileOptions) error {
199
209
o , err := albelbv2 .ELBV2svc .ModifyListener (in )
200
210
if err != nil {
201
211
rOpts .Eventf (api .EventTypeWarning , "ERROR" , "Error modifying %v listener: %s" , * desired .Port , err .Error ())
202
- return fmt .Errorf ("Failed Listener modification: %s." , err .Error ())
203
- return err
212
+ return fmt .Errorf ("Failed Listener modification: %s" , err .Error ())
204
213
}
205
214
l .ls .current = o .Listeners [0 ]
206
215
@@ -211,8 +220,7 @@ func (l *Listener) modify(rOpts *ReconcileOptions) error {
211
220
func (l * Listener ) delete (rOpts * ReconcileOptions ) error {
212
221
if err := albelbv2 .ELBV2svc .RemoveListener (l .ls .current .ListenerArn ); err != nil {
213
222
rOpts .Eventf (api .EventTypeWarning , "ERROR" , "Error deleting %v listener: %s" , * l .ls .current .Port , err .Error ())
214
- return fmt .Errorf ("Failed Listener deletion. ARN: %s: %s" ,
215
- * l .ls .current .ListenerArn , err .Error ())
223
+ return fmt .Errorf ("Failed Listener deletion. ARN: %s: %s" , * l .ls .current .ListenerArn , err .Error ())
216
224
}
217
225
218
226
l .deleted = true
0 commit comments