-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expose referSameObject function #2989
Comments
…he referenced object (closes kubernetes-sigs#2989)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
After the discussions in #2991, I think a better solution for the problem that spawned this issue is to expose the |
/remove-lifecycle stale |
If you are creating a new object, you may need a function to tie this new object to the lifecycle of the owners of the object being reconciled. For example, I have a controller that reconciles pods, which is writing secrets for the pods to use. In the case of a standalone pod, it's fine to just set the pod as an owner of this new secret using
controllerutil.SetOwnerReference()
. However, for pods which have an owner (ReplicaSets, DaemonSets, etc), the secret may be shared with all other related pods, as they are members of the same workload. This requires me to duplicate the logic ofcontrollerutil.upsertOwnerRef()
in my project, since I don't have the objects referred to by the pod'sownerReferences
, only the references themselves and that function is not public. It would be useful in such cases to either makecontrollerutil.upsertOwnerRef()
public, or expose that function through a new public function. If we add the ability to add anOwnerReference
in this way, we should probably also add the ability to remove it as well.The text was updated successfully, but these errors were encountered: