kubernetes-ingress-controller icon indicating copy to clipboard operation
kubernetes-ingress-controller copied to clipboard

Update Gateway status on ReferenceGrant changes

Open rainest opened this issue 3 years ago • 0 comments

What this PR does / why we need it: Reconciles a Gateway if the controller sees a ReferenceGrant that has a From clause for the Gateway.

Update Gateway statuses on every reconcile if they have changed, not just on creation.

Changes Gateway(Class) deploy test helpers to delete existing resources before creating new ones, to ease cluster re-use.

Which issue this PR fixes: fix #2785 fix #2786

Special notes for your reviewer: Contrary to #2785, this does not involve #2694, as the ReferenceGrant Condition is part of Listener status, not the Gateway status. Although Listener statuses are part of the Gateway status, they have their own Condition sets. I don't believe we needed anything to make Listener status conditions a snapshot other than updating them on each reconcile (not doing this earlier was a bug), since we generate them from scratch each time (we do use the previous conditions to make decisions about how to generate the new set, but we do not append them).

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • [x] the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

Just lists the status fix; the rest is tests or part of the ReferenceGrant changes that are already staged for 2.6.

rainest avatar Aug 09 '22 21:08 rainest