Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Conversation

@Buffer0x7cd
Copy link
Contributor

Currently, with each call to reload_state , we create a new instance of k8s client object. This causes constant increase in memory.
This PR make k8s client part of class attribute which let us reuse the existing k8s client without need to create a new client every single time.
More details at: https://yelp.slack.com/archives/CA53K7S68/p1692279792012659



class KubeApiClientWrapper:
_client = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth a comment here re: why this is a classvar now (just to make sure that we can figure out why we did this even if someone moves this line around or something and the git blame no longer points directly at this commit) :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants