-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
play kube: set defaults to container resources #13157
Conversation
Thanks @ydayagi the linter does not like your tests. |
/retest |
@ydayagi: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@rhatdan @umohnani8 @vrothberg @cdoern |
All kinds of red test unhappiness @ydayagi |
I told it to retest, will see how it does. |
@TomSweeneyRedHat @rhatdan |
5177698
to
26254c6
Compare
Is a limit really what most people want by default? I don't have a opinion on that but I just want to make us aware that this will be a breaking change for users. |
Well the guide should be to match what kubernetes does. @umohnani8 @saschagrunert @haircommander @mrunalp WDYT? |
I am pretty sure for most of these fields a limit of 0 is the default which means no limit, or at least that is how podman parses a limit of 0 or nil in some circumstances. why would we place a resource limit that users aren't aware of? |
I'm actually having a bit of trouble finding the default limits here. mostly because poking around the documentation keeps pointing to limit ranges which allow you to customize the default limits and requests. @ydayagi do you have a pointer to where the defaults are specified in kube |
thank you all for your replies. I did not check the documentation. I tested a few times with an existing cluster. I think that as Dan mentioned we have to match the k8s behavior. Another reason to set default is the env var. If env var references the limit field but the field has no value then var value is wrong. |
@rhatdan ? |
If you generate a Pod with this, what does the podman generate kube YAML look like? Do we need to strip all of these fields back out? |
indeed the result of 'generate kube' changed. I will fix that. |
@rhatdan I removed the default setting in the container object. Instead, I use default values when setting the env var value (func envVarValue). |
|
this fixes containers#13115 the change tries to immitate k8s behavior. when limits are not set the container's limits are all CPU and all RAM when requests are missing then they are equal to limits Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>
LGTM |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, ydayagi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
this fixes #13115
the change tries to imitate k8s behavior.
when limits are not set the container's limits are all CPU and all RAM
when requests are missing then they are equal to limits
Signed-off-by: Yaron Dayagi ydayagi@redhat.com