Skip to content

Allow for multiple controllers reconciling same resource type but with different labels #2228

Closed
@goldmann

Description

@goldmann

Bug Report

I have a use case where it would be great to have trow (or more) controllers being able to reconcile the same resource type.

Let's imaging we have a ConfigMap and controller X and Y. Depending on the "type" of the ConfigMap we would like to have applied different reconciliation workflows.

Having to squeeze it in a single controller would be pretty complicated and unnecessary. Instead we could just mark the ConfigMap with a proper label and the use labelSelector on the @ControllerConfiguration annotation so that the resource is picked up by correct controller.

Currently it doesn't work:

Caused by: io.javaoperatorsdk.operator.OperatorException: Cannot register controller 'generationrequestreconciler': another controller named 'operationgenerationrequestreconciler' is already registered for resource 'configmaps/v1'

What did you do?

What did you expect to see?

What did you see instead? Under which circumstances?

Environment

qosdk 6.6.0, quarkus: 3.7.0, josdk: 4.7.0

JDK 17

Possible Solution

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions