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

Switch to ignore FailOnSharedResource for one manual sync #18236

Open
RobinsonZ opened this issue May 15, 2024 · 1 comment
Open

Switch to ignore FailOnSharedResource for one manual sync #18236

RobinsonZ opened this issue May 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@RobinsonZ
Copy link
Contributor

Summary

There should be a switch to ignore the FailOnSharedResource option for a single manual sync.

Motivation

In general, we want to have the FailOnSharedResource option enabled at all times to protect from accidental resource conflicts, particularly those caused by automated processes. However, there are limited cases where we actually want to transfer a resource from one Application to another. In particular, sometimes the original Application has been deleted or is no longer managing those resources but has not pruned them, so they still exist in the cluster with annotations for an app that no longer exists.

We use a monorepo where folders correspond to Applications generated by a GitGenerator. Currently, a folder rename in a repository breaks all syncs for that app until FailOnSharedResource is disabled for the new application and the application is manually synced. This is particularly painful because there's no GUI option to disable or enable FailOnSharedResource, so the edit must be made by hand-editing the manifest. (And the parent ApplicationSet might need to be configured to ignore the changes as well.)

Proposal

From my understanding of the code, the default sync options of the application are overwritten here by any sync options that are specified in the API call. Currently, the UI passes along all sync options that are set in the sync request (or, more to the point, it doesn't have a GUI option for FailOnSharedResource, so you can't disable it manually). My proposal is to implement an option in the UI that allows the FailOnSharedResource=true option to not be sent with the sync request for a given sync.

@RobinsonZ RobinsonZ added the enhancement New feature or request label May 15, 2024
@RobinsonZ
Copy link
Contributor Author

Also, see #7444 where FailOnSharedResource (but evidently not the GUI support for it) was added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant