-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
As an operator I would like to be able to define init-container resources #2931
Comments
I think the main issue here is that the There could maybe be a separate func created for init containers to apply limit range minimums if present as A question I have is if the Another possible approach could be to add support for |
thanks for the answers @danielhelfand . It is good that you explain the rational behind why Tekton chose limitrange
When you say adding support for |
My personal opinion on the ways step resource requests are handled is that it is a confusing user experience. The way the algorithm works for pipelines is to only accept the max resource request values across all step containers part of a TaskRun. If a limitrange minimum is present, the min is applied to all steps without max values for CPU, memory, and storage. If no min is present, all containers are zeroed out. The original implementation of this came because of #598. So in the context of steps, supporting a What's confusing about steps is that each step can be defined with resource requests, but the only requests acknowledged are the max values. I am wondering if pipelines should support some way of only having to define resource requests once as opposed to supporting the ability to do so for each step. And while the user experience for init containers is inconsistent in the case of how to define resource requests, maybe it makes sense to keep the |
Yes, I agree, you are totally right. Specially around the fact that containers(steps) are sequentially executed.
Ok, it make sense as an additional feature. Maybe this inlines with #2984 (comment) ?
I think defining also resources for the init containers should be possible, what would be the next step on that particular topic(init containers resources definition)? |
Reading through the issue, it sounds like the specific concrete request is for Tekton's injected Step resource requests are indeed confusing, but this issue is specifically about Tekton's |
I think it’s actually that the defaultRequest is applied currently for initContainers but the min is applied for steps, which is leading to confusion dealing with requests. Unless I am misinterpreting this, which I thought meant that defaultRequest is currently applied for initContainers:
|
Yep, it is better that Tekton init and user containers use the same resource settings to avoid the confusing. Because we have different defaultRequest and min settings in LimitRange, I always need to think what is init container settings, what is the tekton user container settings :( After tekton has the confirmed solution for init container, it is also better to show the example in this doc: |
what @danielhelfand mentioned is correct:
For the initContainers resource request, the Some open questions:
I think that no, if I get this right, the
I do not see a reason why not to do this. |
Users and operators should not care what resources we assign to
If Tekton's doing what it's supposed to, this should also apply to |
@imjasonh are you saying that for steps(containers) we should use |
For steps, we should assign one container the |
ok, which is already the case. |
im closing this issue in favor of 2986, thanks all for the nice discussions. |
This really depends on what are those values though. If the |
Feature request
Similar to how the resources values (cpu/memory) are managed by the pipeline controller for
TaskRun
containers(see docs) . It would be interesting to see if this pattern could apply to theTaskRun
initContainers.The current default behaviour when a LimitRange exists on the namespace is that the
initContainers
get the LimitRangedefaultRequest
values when resources are not specified, while thecontainers
get themin
values, when the resources are not specified.Use case
The use-case is around how can I control the TaskRun pod's effective request/limit resource. I think this use-case arises from the need to have full control on the pod effective request/limit in order to define proper pricing during the pod execution. When I say pricing I meant some sort of number that is calculated from the effective request/limit resource during a certain amount of time.
To achieve this, ideally the
init-container
resources should be also configurable as thecontainers
and follow the same pattern as the TaskRun containers, when resources are not defined. I think the pattern should be the same, in order to have a common set of resources values for both containers and init-containers.The text was updated successfully, but these errors were encountered: