-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the stability of the operator in big clusters (#283)
This change improves the stability of the operator for big clusters. When used to create big clusters (> 40 nodes), the number of things it had to do per pod starts adding up. Calls to 'kubectl exec' to get various state (cmds package) can take a while. There is also a lot of memory pressure when 'kubectl exec' is called frequently -- we send the command to the REST endpoint that uses gzip to compress/uncompress the input/output. The compression library, which we don't have any control over, uses a lot of memory. Go is a garbage collection language, so the memory is eventually freed, but the GC can take some time to kick in. The approach taken in this change is to batch as many 'kubectl exec' commands as we can. This change impacts the podfacts collector, installer reconciler and create db reconciler. The end result is that there is less memory pressure and it is quicker for a reconcile iteration to get through its various state checks. Refactor of the main.go module. Most of the command line argument handling was moved to a separate package called opcfg. This was changed because I wanted to flow down the command line arguments into the controllers so that we can log things only when in dev mode. So, we need to put the arguments in an exported struct from a new package that the controllers would have access to. Included in this is a change to make it easier to run the operator locally. A new script was added that handles proper setup and teardown.
- Loading branch information
spilchen
authored
Nov 9, 2022
1 parent
77588c9
commit efb566b
Showing
38 changed files
with
810 additions
and
716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: Fixed | ||
body: Improve the stability of the operator in big clusters | ||
time: 2022-11-07T10:36:57.957077201-04:00 | ||
custom: | ||
Issue: "283" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.