Skip to content

Commit 330494d

Browse files
authored
Skip catalog discover when operator is not found in OperandRegistry (#1050)
Signed-off-by: Daniel Fan <[email protected]>
1 parent 287eafa commit 330494d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/operator/manager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ func (m *ODLMOperator) GetOperatorNamespace(installMode, namespace string) strin
402402
// GetOperandFromRegistry gets the Operand from the OperandRegistry
403403
func (m *ODLMOperator) GetOperandFromRegistry(ctx context.Context, reg *apiv1alpha1.OperandRegistry, operandName string) (*apiv1alpha1.Operator, error) {
404404
opt := reg.GetOperator(operandName)
405+
if opt == nil {
406+
return nil, nil
407+
}
408+
405409
// Get excluded CatalogSource from annotation
406410
// excluded-catalogsource: catalogsource1, catalogsource2
407411
var excludedCatalogSources []string

0 commit comments

Comments
 (0)