Skip to content
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

[WIP - testing] Add resource version parameter for kubernates strategy #207

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Argonus
Copy link

@Argonus Argonus commented Nov 27, 2024

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

  • using cached version of resource (implemented in PR)
  • using watch to subscribe to changes (investigating possible solutions)

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

  • Add kubernetes_resource_version parameter to Kubernates strategy, that allows to select given resource version, in our case, select 0 as a cache.
  • Added test cases for extended api call.

Checklist

  • New functions have typespecs, changed functions were updated
  • Same for documentation, including moduledocs
  • Tests were added or updated to cover changes
  • Commits were squashed into a single coherent commit
  • Notes added to CHANGELOG file which describe changes at a high-level

@Argonus Argonus changed the title Add resource version parameter for kubernates strategy [WIP] Add resource version parameter for kubernates strategy Nov 27, 2024
@Argonus Argonus changed the title [WIP] Add resource version parameter for kubernates strategy [WIP - testing] Add resource version parameter for kubernates strategy Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant