-
Notifications
You must be signed in to change notification settings - Fork 56
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
Remove watching for existing underline resources at init stage #97
base: master
Are you sure you want to change the base?
Conversation
Add InitIdentityCount
I'm good with adding the variable based activation of the controller. |
To reduce the kube API requests and remove overlapped queueing. |
@cuttingedge1109 we do need pre-existing resources, this what distinguish a level-based automatic control from a edge-based automatic control. Operator are level-based. I talk about this a bit here[1], but you can find more about that in internet. |
@raffaelespazzoli with this change we do see that API server isn't bombarded anymore with insane amount of traffic; i have attached two screenshots one for |
I looked at the code and I confirm that this is not a good approach for me. The reason is that if the namespace operator pod dies and some objects are changed (updated/created/deleted) while the pod is down, they will never be reconciled. |
Ah! very good point.
Hmmm; but you can see from the graphs that with this new version api-server wasn't overwhelmed
The moment we turn on nco it kills api server; would be hard to figure out but lets see if we can figure out or not |
@rasheedamir I'd like to know what calls overwhelm the API server GET vs POST and for which type. There are metrics to see these things. |
So regarding the 2nd part of changes is not to disable watchers.
In general, one namespaceConfig CR is poiting several namespaces(for our case, about 30 namespaces). So I tried to skip the queueing only at the startup time and after that the second watcher will work. |
Regarding It is caused by the |
@raffaelespazzoli do you agree to @cuttingedge1109? we definitely see that this version is far more stable and consumes way less memory |
@rasheedamir I have explained why the create events at the start of the controller cannot be discarded. I am good only with the piece that selectively activates the controller based on environment variables. |
@raffaelespazzoli that is not discarded, just added smoothly. |
@cuttingedge1109 please explain me what you mean by "added smothly": it seems to me that with your proposal we drop the create event during the initial start of the controller. This is not acceptable and I have explained why. Also I asked you guys to provide proof of how the api server is overwhelmed with some metrics that could indicate where the problem is, would you be able to do that? I'm interested in fixing that issue if at all possible. I didn't understand your explanation though. If you have a fix proposal, I'd be happy to look at it. The main requirement here is that when the internal controllers complete their reconcile cycle, the resulting state needs to be reflected to the external CR status. |
may I close this PR? |
This PR includes mainly 2 things:
Add environment variables to enable/disable controllers respectively
ENABLE_GROUPCONFIG_CONTROLLER
is true or not defined,GroupConfig
controller is enabled.ENABLE_USERCONFIG_CONTROLLER
is true or not defined,UserConfig
controller is enabled.ENABLE_NAMESPACECONFIG_CONTROLLER
is true or not defined,NamespaceConfig
controller is enabled.Do not queue for pre-existing underline resources at the initial/booting step
Closes #96