Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed reconcile running on all KIngress after ksvc deletion #1159

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/reconciler/ingress/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl

r.resyncConflicts = func() {
impl.FilteredGlobalResync(func(obj interface{}) bool {
lbReady := obj.(*v1alpha1.Ingress).Status.GetCondition(v1alpha1.IngressConditionLoadBalancerReady).GetReason()
lbReady := obj.(*v1alpha1.Ingress).Status.GetCondition(v1alpha1.IngressConditionLoadBalancerReady)
// Force reconcile all Kourier ingresses that are either not reconciled yet
// (and thus might end up in a conflict) or already in conflict.
return isKourierIngress(obj) && (lbReady == "" || lbReady == conflictReason)
return isKourierIngress(obj) && (lbReady == nil || lbReady.GetReason() == conflictReason)
Copy link
Contributor

@skonto skonto Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that:

func (c *Condition) GetReason() string {
	if c == nil {
		return ""
	}
	return c.Reason
}

Ingresses that have condition(LBReady) that is not nil, do have Reason "" and match all the reconciled ones correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for successfully working ingresses, the condition(LBReady) is not nil and the Reason is empty.

}, ingressInformer.Informer())
}

Expand Down
Loading