-
Notifications
You must be signed in to change notification settings - Fork 519
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
How to define pod resource limits in pom.xml
?
#2040
Comments
Do you want to add these in Deployment's PodTemplateSpec? |
Currently working with an OpenShift cluster. I need it to end up within the DeploymentConfig.yaml. |
I don't think we're supporting this currently. We do provide support for setting requests/limits for OpenShift S2I build but for main DeploymentConfig it is not available at the moment. Maybe we can add these fields in <configuration>
<resources>
<requests>
<cpu>500m</cpu>
<memory>512Mi</memory>
</requests>
<limits>
<cpu>1000m</cpu>
<memory>1Gi</memory>
</limits>
</configuration> our DefaultControllerEnricher would add these specified requests/limits into generated controllers. |
Thank you for the explanation. Any good examples on how to approach this? |
For now, you're using fragments, right? Do you think for now you can try using |
yeah, I am using fragtments, but wanted to get away from that, as each file (for each NS) are more or less identical; resources being the dynamic component. |
ahh, there's a |
when combining multiple "environments" it seems to do the trick. Thanks! |
I think providing resource limits via XML/Groovy DSL might also be a good addition. |
I agree, then I could get completely rid of the remaining fragments. |
@manusa : Do you think providing resource requests/limits in |
It think it makes a lot of sense! A little too busy right now to add it myself, but maybe in a few weeks I could start contributing this; or just assist in testing/validating the solution. |
Yes it does. However, we need to fix the ResourceConfig class first. We've been adding more and more fields there and everything is a mess. We need to merge #1969 before proceeding with this. |
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + Add new field `resourceClaims` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + Add new field `resourceClaims` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
ResourceRequirements struct ( Does it make sense to add support for this field as well? Or shall we leave it for now until some user requests it in future (when it becomes stable)? |
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (eclipse-jkube#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…mits via controller resource config (#2040) + Rename existing OpenShiftBuildConfig class (that was only for OpenShift Build requests/limits) to RequestsLimitsConfig + Add new field `resourceRequestsLimits` to ControllerResourceConfig + ContainerHandler adds provided requests/limits to container if they're provided in ControllerResourceConfig via abovementioned fields. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Hi Guys,
I wanted to see if I could get rid of all partial yaml definitions and instead rely solely on what is available through the
pom.xml
. But I am having trouble with defining the resourcerequests
and releaselimits
within thepom.xml
.I can't seem to locate it in the documentation, but I might just be missing it.
Any pointers on how to achieve this would be great.
Thanks,
Tue
The text was updated successfully, but these errors were encountered: