-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add leader election to Functions processing (#480)
* Add "suspended" and "observedGeneration" to the funtions CRD The suspended property enables an operator to suspend processing of a CRD during some investigative period. The ObservedGeneration property enables us to remain stateless with respect to our processing model. So instead of having to maintain a cache so that we can determine when a CRD has been updated, we can remove the cache and know if a CRD requires reconciling by comparing its ObservedGeneration to the current Generation. * Delegate Function CRD handling to tasks There's no need to be reconciling Functions in more than one place. We already periodically reconcile functions in our task handler, so there's no need to do so in the uploader, too. * Combine the functionality of storage and crd There is an extra bit of unecessary abstraction that complicates our Function handling where our storage package is acting as a glue between the crd and adx packages. By combining the storage and crd package it's far easier to understand the code's flow. Furthermore, the code that lives in pkg is generally meant to be shared by more than one other package, so until that's necessary, having a crd package doesn't fit the intent of pkg. * Integrate new function store to task management Several unit tests were removed for this commit due to the shift of responsibility with respect to ObservedGeneration and LastReconcileTime, which was moved from task management to the function store layer. The reason for moving the responsibility for these two fields is that it's a bit of an implementation leak for the kusto layer to have to understand how and why the ObservedGeneration and LastReconciledTime are utilized. * Integrate the new function store * Remove unused CRD tool * Drop KQL Functions upon CRD deletion
- Loading branch information
Showing
19 changed files
with
956 additions
and
700 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
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.