[WIP - testing] Add resource version parameter for kubernates strategy #207
+139
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Why
In enviroment with multiple different application, using same kubernates cluster, many apps may trigger thousends of requests to cluster API to get requested resources. In our case, we talk about 500000 requests per hour. In such a case, direct requests to etcd may impact cluster resources. Solution for such a case may be
In this PR, as cache should be eventually consistent, I've implemented simples solution for such a issue, aka using cached version of resource instead of direct API call. According do AWS, which is our cluster provider, cache inconsistency should be
few tens of milliseconds
What
kubernetes_resource_version
parameter to Kubernates strategy, that allows to select given resource version, in our case, select 0 as a cache.Checklist