-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
🏃Rename EnsureOwnerReference to SetOwnerReference for consistency #844
🏃Rename EnsureOwnerReference to SetOwnerReference for consistency #844
Conversation
Given that we haven't released v0.5.1 yet, we can consider this as non-breaking in the current cycle |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f8d006d
to
03beb79
Compare
Why do we actually have these two, does the controller boolean make any difference at all? |
In some cases you might want multiple OwnerReferences, only one can be set (when using these or metav1 utilities, not actually sure if api server throws an error). Multiple OwnerRefs can be useful when you want to create a tree of dependencies between objects |
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.
In some cases you might want multiple OwnerReferences, only one can be set (when using these or metav1 utilities, not actually sure if api server throws an error). Multiple OwnerRefs can be useful when you want to create a tree of dependencies between objects
Now seems like a good time to go ahead and document this. I know from experience that when I have scoured godoc that an explanation why I might want to use SetOwnerReference
would be helpful.
Signed-off-by: Vince Prignano <vincepri@vmware.com>
03beb79
to
ca1f091
Compare
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
/hold
so @djzager can check on the comment
/hold cancel as per above approval |
To be consistent with
SetControllerReference
, rename EnsureOwnerReference to SetOwnerReference.