You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reconciling gatewayclasses in order to ensure the Istio CR, make sure to
use the oldest gatewayclass that has our controller name.
Before this commit, the controller behaved inconsistently:
- The controller's watch on gatewayclasses reconciled the specific gatewayclass
that triggered the watch.
- The controller's watches on subscriptions, installplans, and istios reconciled
the "openshift-default" gatewayclass.
This inconsistency caused several problems:
- If a gatewayclass existed with our controller name but none existed with the
name "openshift-default", the controller logged spurious reconcile requests
for, and failures to get, the "openshift-default" gatewayclass.
- If multiple gatewayclasses existed with our controller name, the controller
tried to update the owner reference on the Istio CR every time the controller
reconciled a gatewayclass other than the one in the owner reference.
Using the oldest gatewayclass solves these problems.
* pkg/operator/controller/gatewayclass/controller.go
(enqueueRequestForDefaultGatewayClassController): Rename...
(enqueueRequestForSomeGatewayClass): ...to this. Delete the unused namespace
parameter. Look up the oldest gatewayclass with our controller name, and return
a reconcile request for that gatewayclass.
(NewUnmanaged, Reconcile): Use enqueueRequestForSomeGatewayClass for all
watches.
0 commit comments