Skip to content

Commit 1d8e194

Browse files
committed
Fix error check for list operatorgroup call
Signed-off-by: Vu Dinh <[email protected]>
1 parent a401647 commit 1d8e194

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/controller/operators/olm/operator.go

+4
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,10 @@ func (a *Operator) syncNamespace(obj interface{}) error {
830830

831831
// Query OG in this namespace
832832
groups, err := a.lister.OperatorsV1().OperatorGroupLister().OperatorGroups(namespace.GetName()).List(labels.Everything())
833+
if err != nil {
834+
logger.WithError(err).Warn("failed to list OperatorGroups in the namespace")
835+
return err
836+
}
833837

834838
// Check if there is a stale multiple OG condition and clear it if existed.
835839
if len(groups) == 1 {

0 commit comments

Comments
 (0)