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

Sinker should add a ResourceSync as an owner of local-cluster target objects #22

Open
cannonpalms opened this issue May 24, 2023 · 0 comments

Comments

@cannonpalms
Copy link
Contributor

cannonpalms commented May 24, 2023

Sinker can perform two actions, each in one of two contexts: It can (1) create and (2) update an object in either a (1) remote cluster or (2) the local cluster.

Let's ignore the two cases that involve a target object in a remote cluster, because we cannot take cross-cluster owner references.

When a ResourceSync creates a new target object in the local cluster, we should take ownership of that new object. This ensures proper garbage collection in this case. Default Kubernetes DELETE behavior is for deletes to propagate from owning objects to dependent/owned objects.

There are two open questions here, in my opinion:

  1. Should we add the ResourceSync as an owner of any local-cluster target we modify, or should we only take ownership of objects we ourselves create? Perhaps instead we should take ownership of any object--created by us or not--that has no existing owner references? Answering this question involves some exploration of how garbage collection / delete propagation functions in multi-owner situations.
  2. Are there any circumstances in which is is appropriate to take not only an owner reference on a target object but also a controller reference? Perhaps controller references fit those cases where sinker creates an object in the local cluster? Does this decision impact garbage collection / delete propagation at all, or is it just symbolic?
@cannonpalms cannonpalms changed the title Sinker should add itself as an owner of local-cluster target objects Sinker should add a ResourceSync as an owner of local-cluster target objects May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant