operator-sdk icon indicating copy to clipboard operation
operator-sdk copied to clipboard

helm: fix a memory leak resulting from too many k8s client instantiations

Open misberner opened this issue 3 years ago • 0 comments
trafficstars

See https://github.com/operator-framework/helm-operator-plugins/pull/198 for a detailed description of the issue. This commit ports over the relevant changes.

I assume that eventually, the generic helm-operator code in this repo should depend on github.com/operator-framework/helm-operator-plugins. However, because the latter repo is still marked as experimental, and importing it would result in a large number of accidental dependency changes, I have decided to merely copy code over.

I've tried to minimize changes to both the copied code as well as the existing code in this repo. Because the bulk of the code is copied, I don't think replicating tests would be useful, but I can see if I can copy them over if it turns out to be not too much effort.

Description of the change: Fix a memory leak in the Helm operator code.

Motivation for the change: Excessive memory usage of Helm operators (2GB+)

Checklist

If the pull request includes user-facing changes, extra documentation is required:

misberner avatar Sep 08 '22 21:09 misberner