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

Update resources for lifecycle sidecar and init container for connect-inject #291

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

kschoche
Copy link
Contributor

@kschoche kschoche commented Jul 9, 2020

Currently the initContainer for connect-inject has a resource limit of 25Mi, this was introduced as a feature in the 0.16.0 release.
As part of it's runtime the initContainer issues a cp of the consul binary (100Mi+). Normally this is fine but it is possible to get into a situation where the host is under resource pressure and enough dirty pages from the cp operation accumulate in memory such that an OOM is triggered.
The initContainer is short lived and we just need it to run, so increase the resource limit to the size of the consul binary.
Likewise the lifecycle sidecar's settings were set too low, we double the cpu resources to alleviate cpu constraints.

This resolves #283

@kschoche kschoche added type/bug Something isn't working type/enhancement New feature or request labels Jul 9, 2020
@kschoche kschoche requested review from lkysow and ishustava July 9, 2020 16:28
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

LGTM

connect-inject/container_init.go Outdated Show resolved Hide resolved
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
@kschoche kschoche merged commit 402c38b into master Jul 9, 2020
@kschoche kschoche deleted the update_resources_consul_k8s branch July 9, 2020 16:47
ndhanushkodi pushed a commit to ndhanushkodi/consul-k8s that referenced this pull request Jul 9, 2021
Bump default consul version to 1.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OOM after moving to consul-k8 0.16.0
3 participants