-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add a None value to ClusterSyncMode #798
Comments
This looks interesting and reasonable. I don't know whether adding a taint for the cluster will do some help in this scenario. Maybe it can only cover a small part.
I am okay for this feature. But before we move on, we need to make some clarifications.
|
In our environment, we use the "Deploying Applications to Multiple Clusters with Replication Scheduling" method for distributing applications, so we would prefer that setting taints or introducing syncPaused leads to a sort of "lockdown" state. |
When adding a taint, it will trigger a rescheduling.
If so, we need to firstly make sure there won't be any inconsistencies between clusternet-agent flags and |
Regarding the inconsistency between However, I now have a rather interesting 🌟 solution💡! I think I can set the Or rather, the inconsistency of |
Better not. And we won't want to change these settings/flags back and forth, since we may want to enable the synchronization.
Currently Now the question comes to whether we should allow modifying If we only want to pause the synchronization, I'd prefer to add a new boolean field |
Alright, let's discuss the details of how to add the syncPaused field. Once syncPaused is added, it should be relatively convenient to handle in the parent cluster, as we can easily retrieve the syncPaused value from a certain mcls object to decide whether synchronization is needed. However, in the child cluster, when triggering the synchronization of applications, should we also query the syncPaused value in real-time on the mcls object to determine whether to synchronize the application? What are your thoughts on this? |
Right. We only need to add a check for this on clusternet-controller-manager side.
We can add a mcls informer only watching itself by cluster id. Once the field |
I don't have extensive knowledge about k8s, and I want to confirm if my understanding is correct: On the Additionally, is it necessary to fetch the cached |
Yes. And
We've got informers. In the informers, these objects have already been cached. We just need to retrieve the mcls object from the listers cache. |
What would you like to be added:
Add a
None
value toClusterSyncMode
to prevent or pause updates and distribution of applications on a certainmcls
, while preserving the existing applications on themcls
.Why is this needed:
The 'None' value indicates that the synchronization mode is unset, which means applications will not be synchronized. Introducing 'None' as a value allows ClusterSyncMode to accommodate a wider range of scenarios.
We manage hundreds of clusters distributed across the country, and there is an occasional need to halt the synchronization of applications in certain clusters while retaining the original applications on the cluster. However, after halting synchronization, we must still maintain connectivity to the subclusters, thus the connection must remain active.
If this requirement is feasible, I think I can try submitting a PR.
The text was updated successfully, but these errors were encountered: