-
Notifications
You must be signed in to change notification settings - Fork 326
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
Support resource settings #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luke, great work! It's very exciting to see this! This mostly looked good to me, and I left a couple of comments and suggestions.
One question I had is whether you think we need to validate that limit >= request
for annotations and defaults. I think this is an invalid configuration and kubernetes will return an error. I'm thinking that at least in the case of defaults, it might be useful to get early feedback before you get to deploying services.
Good call, added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updates look great!
FYI I haven't re-tested everything with these updates on an actual cluster because I haven't found any issues the first time.
- default resource settings for the envoy sidecar can be set via flags - these can be overridden by annotations on the injected pods - by default there are not resource settings - add resource settings to init container and sidecar container. These are always set so users who require resource settings don't need to turn them on. They are set to more than double observed usage so they won't affect any users. They are not customizable via annotation or flag because they don't change based on use-case. They could be exposed later.
-default-sidecar-proxy-cpu-limit
-default-sidecar-proxy-cpu-request
-default-sidecar-proxy-memory-limit
-default-sidecar-proxy-memory-request
consul.hashicorp.com/sidecar-proxy-cpu-limit
consul.hashicorp.com/sidecar-proxy-cpu-request
consul.hashicorp.com/sidecar-proxy-memory-limit
consul.hashicorp.com/sidecar-proxy-memory-request
See hashicorp/consul-helm#470 for testing.
Refactors @wuvs work from #109.