-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add assignedFromTags property to assignment * Don't fail for unknown properties on NodeDetails This makes it easier to extend the sidecar in the future * Create sidecar config assignments based on tags This is a first naive approach. Every registration request will rebuild the assignments and this is probably too expensive. * fix test * Fix more Tests * Fine grained EtagService Use three different caches for configs, collectors and assignments. * Add Etag caching for UpdateRegistration results The response to the registration PUT request contains configuration assignments, which can be cached as well. This requires us to invalidate the sidecar etag cache in more situations: - Configration assignments - User triggered collector actions (stop, start, restart) * Cleanup old assignment caching commit * optimize * fix after merge * replace deprecated notempty annotation * cache assignments per sidecar id using just the md5 of an assignment result might leed to sidecars missing out on updates. An assignment is always meant for a single sidecar, caching the entire assignment over all sidecars is wrong. A per sidecar cache entry allows more fine grained cache invalidations. Bump the cacheMaxSize to 5000 entries, which is a more meaningful number, considered that this might have to hold all sidecars. * Refactor sidecar register() call. Only update the tagged assignments when we miss the cache. * change cache naming * more refactoring * improve cache invalidation * use fancy java Co-authored-by: Othello Maurer <[email protected]> * Add more cases for tag invalidation and fix tests * add tags to Config summary * Generate EntityTags with a better hash algorithm As @thll noticed, Object.hashCode() is prone to having collisions * Handle manual assignments via API * rename * Make tags available as config variables. This allows configs to be written with conditionals. E.g.: ``` <#if sidecar.tags.apache??> - /var/log/apache/*.log </#if> ``` * dont lose tags on UI configuration updates Co-authored-by: Othello Maurer <[email protected]>
- Loading branch information
Showing
20 changed files
with
343 additions
and
139 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
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.