Skip to content

Commit b3017a4

Browse files
committed
lint fix
1 parent 6df1c16 commit b3017a4

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

internal/controller/gateway_controller.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,12 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
9898
tctx := &translator.TranslateContext{
9999
Secrets: make(map[types.NamespacedName]*corev1.Secret),
100100
}
101-
if err := r.processListenerConfig(tctx, gateway, ns); err != nil {
101+
r.processListenerConfig(tctx, gateway, ns)
102+
if err := r.ControlPlaneClient.Update(ctx, tctx, gateway); err != nil {
102103
acceptStatus = status{
103104
status: false,
104105
msg: err.Error(),
105106
}
106-
} else {
107-
if err := r.ControlPlaneClient.Update(ctx, tctx, gateway); err != nil {
108-
acceptStatus = status{
109-
status: false,
110-
msg: err.Error(),
111-
}
112-
}
113107
}
114108

115109
ListenerStatuses, err := getListenerStatus(ctx, r.Client, gateway)
@@ -221,7 +215,7 @@ func (r *GatewayReconciler) listGatewaysForHTTPRoute(_ context.Context, obj clie
221215
return recs
222216
}
223217

224-
func (r *GatewayReconciler) processListenerConfig(tctx *translator.TranslateContext, gateway *gatewayv1.Gateway, ns string) error {
218+
func (r *GatewayReconciler) processListenerConfig(tctx *translator.TranslateContext, gateway *gatewayv1.Gateway, ns string) {
225219
listeners := gateway.Spec.Listeners
226220
for _, listener := range listeners {
227221
if listener.TLS == nil || listener.TLS.CertificateRefs == nil {
@@ -247,5 +241,4 @@ func (r *GatewayReconciler) processListenerConfig(tctx *translator.TranslateCont
247241
}
248242
}
249243
}
250-
return nil
251244
}

0 commit comments

Comments
 (0)