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
Check whether the gatewayclasses, gateways, and istios CRDs actually exist
before adding them to relatedObjects.
Also, use the "GatewayAPIController" featuregate for the gateways and istios
resources, rather than the "GatewayAPI" featuregate.
Before this change, the operator could add istios to relatedObjects even if the
OSSM subscription failed to install. By convention, an operator should only add
resources to relatedObjects if those resources exist.
This commit fixes OCPBUGS-54745.
https://issues.redhat.com/browse/OCPBUGS-54745
* pkg/operator/controller/status/controller.go
(gatewaysResourceName, gatewayclassesResourceName, istiosResourceName): New
consts for the CRD names.
(relatedObjectsCRDs): New var for a string set that contains
gatewaysResourceName, gatewayclassesResourceName, and istiosResourceName.
(New): Add a watch on CRDs, with a predicate for CRDs with names that are in
relatedObjectsCRDs.
(Config): Add GatewayAPIControllerEnabled.
(Reconcile): Check haveGatewayclassesResource, haveGatewaysResource, and
haveIstiosResource in the operatorState object and conditionally add the
corresponding resources to relatedObjectsCRDs.
(operatorState): Add haveGatewaysResource, haveGatewayclassesResource, and
haveIstiosResource fields.
(getOperatorState): Set haveGatewaysResource, haveGatewayclassesResource, and
haveIstiosResource.
* pkg/operator/operator.go (New): Specify GatewayAPIControllerEnabled in the
status controller config.
0 commit comments