-
Notifications
You must be signed in to change notification settings - Fork 33
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
Set a Binding's owner reference, but not a controller reference #256
Conversation
Signed-off-by: John Starich <[email protected]>
Signed-off-by: John Starich <[email protected]>
Signed-off-by: John Starich <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
==========================================
+ Coverage 92.07% 92.32% +0.25%
==========================================
Files 6 6
Lines 757 821 +64
==========================================
+ Hits 697 758 +61
- Misses 39 41 +2
- Partials 21 22 +1
Continue to review full report at Codecov.
|
Signed-off-by: John Starich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one small comment.
@@ -76,10 +76,11 @@ type BindingReconciler struct { | |||
GetCFServiceKeyCredentials cfservice.KeyGetter | |||
GetServiceName resource.ServiceNameGetter | |||
GetServiceRoleCRN iam.ServiceRolesGetter | |||
SetControllerReference ControllerReferenceSetter | |||
SetControllerReference OwnerReferenceSetter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! We still have controller references set on the Binding's generated secrets 👍
Bindings currently have owner references set to their Service counterpart. However, they use
controller: true
today – which causes problems when orchestrated by other operators.Bindings don't need
controller: true
since they weren't created by the operator, they were created by some other entity (e.g. CrossPlane operator or manually).The controller owner reference really only belongs on Secrets it creates for a Binding object, since those are entirely managed by the controller. Further reading: Owners and dependents, ControllerRef proposal
To preserve backward compatibility, the owner reference remains but is no longer set as a "controller reference."
Fixes #222, fixes #254
Closes #255