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

Respect controller flag in owner references #501

Open
mkjpryor opened this issue Jan 30, 2023 · 1 comment
Open

Respect controller flag in owner references #501

mkjpryor opened this issue Jan 30, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mkjpryor
Copy link

mkjpryor commented Jan 30, 2023

Summary

Currently, gitops-engine only considers resources with no owner references as top-level resources, and hence refuses to delete objects that have any owner references.

I would like to have a configuration and/or sync option to say that only owner references with controller: true should be respected when determining whether a resource is a top-level resource and can be deleted.

Motivation

I would like to use Argo CD to manage Cluster API clusters, but Cluster API adds owner references with controller: false to all resources that are part of a cluster but not directly managed by Cluster API (in particular, MachineDeployments). This means that Argo CD refuses to delete those resources even though it created them and there are no other controllers managing them.

I believe that that this is the correct behaviour from Cluster API, as those resources do indeed have a dependency on the Cluster object but Cluster API is not responsible for managing their lifecycle (other than cascade deletion).

Currently, this is a massive blocker for anyone who wants to use Argo CD to manage Cluster API clusters.

Proposal

I would like to see an additional sync option, RespectControllerReferencesOnly=true, that can be set on an application to enable this behaviour.

@mkjpryor
Copy link
Author

See also argoproj/argo-cd#12210

@todaywasawesome todaywasawesome added enhancement New feature or request help wanted Extra attention is needed labels Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants