Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding CR should not have a ControllerReference #222

Closed
pdettori opened this issue Sep 24, 2020 · 0 comments · Fixed by #256
Closed

Binding CR should not have a ControllerReference #222

pdettori opened this issue Sep 24, 2020 · 0 comments · Fixed by #256
Labels
enhancement New feature or request

Comments

@pdettori
Copy link
Member

Motivation:
I have a higher level Custom Resource that composes and instantiate the Service and Binding CR. The higher level CR sets
the ControllerReference in the binding CR because it is managing its lifecycle, but this causes the Binding controller to fail
because a CR cannot have two owner references:

2020-09-24T10:06:36.029-0400    ERROR   controller-runtime.controller   Reconciler error        {"controller": "binding", "request": "default/my-translator-bbjb4-kttvx", "error": "Object default/my-translator-bbjb4-kttvx is already owned by another CompositeTranslatorInstance controller my-translator-bbjb4"}

The issue is that the binding controllers sets a service instance as owner reference for the binding CR. Typically, such owner references are set when a higher-level CR is used to create a lower-level CR (e.g. Deployment creates a Replica Set, and sets the ControllerReference in the ReplicaSet ). In the IBM Cloud Operator service case, the binding CR is not created by the service CR, but it has an independent lifecycle as it can be independently created and deleted. Furthermore, even if service CR is deleted, I should be able to point a binding CR to a new service CR if desired.

@pdettori pdettori added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant