Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoids memory leak in istio sidecar termination (#972)
## Description Taking a stab at fixing a memory leak in core sidecar job termination logic. This change creates a dummy stream to pass into the k8s.exec call instead of using process.stdin. Additional changes to the `shouldTerminate` condition were added to account for the scenario where the sidecar was already terminated from a previous watch firing. This was previously not an issue because we were never removing items from `inProgress` until we added [these lines](https://github.com/defenseunicorns/uds-core/blob/main/src/pepr/istio/index.ts#L87-L89). ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Micah Nagel <micah.nagel@gmail.com> Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
- Loading branch information