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

Fix memory usage for tiller-proxy #1058

Merged
merged 2 commits into from
Jun 19, 2019

Conversation

andresmgot
Copy link
Contributor

Fix #1052

Cache the result of unmarshaling the index.yaml file of a repository.

Increase the memory limit for Tiller-proxy.

Copy link
Contributor

@prydonius prydonius left a comment

Choose a reason for hiding this comment

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

Nice, caching the index is a great idea. Are we able to add any unit tests for this?

if err != nil {
return index, err
func checksum(data []byte) string {
hasher := sha1.New()
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason we want to use sha1 and not sha256?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assumed it was faster but I guess it's not really needed

}

func parseIndex(repoURL string, data []byte) (*repo.IndexFile, error) {
sha := checksum(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure the cache check should be part of parseIndex, it would make more sense if we checked the cache in a separate function before parseIndex.

@andresmgot
Copy link
Contributor Author

Nice, caching the index is a great idea. Are we able to add any unit tests for this?

Added now that it has its own function

@andresmgot andresmgot merged commit 9b3e728 into vmware-tanzu:master Jun 19, 2019
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.

[tiller-proxy] Tiller-proxy pod gets killed because memory usage
2 participants