Skip to content

Commit fa35837

Browse files
committed
修复(DedicatedCLBListener): pod已被绑定但状态不是bound时修复下状态
1 parent 70dc93c commit fa35837

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: internal/controller/dedicatedclblistener_controller.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ func (r *DedicatedCLBListenerReconciler) ensureBackendPod(ctx context.Context, l
327327
}
328328
}
329329
if !needAdd {
330-
log.V(6).Info("backend pod already registered", "podIP", pod.Status.PodIP)
330+
if lis.Status.State != networkingv1alpha1.DedicatedCLBListenerStateBound { // pod 已被绑定但状态不是bound,更新下状态
331+
if err := r.changeState(ctx, lis, networkingv1alpha1.DedicatedCLBListenerStateBound); err != nil {
332+
return err
333+
}
334+
}
331335
return nil
332336
}
333337
r.Recorder.Event(

0 commit comments

Comments
 (0)