-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[OpenShift] Adding property to set workspaces memory request on OpenShift #4671
Conversation
Can one of the admins verify this patch? |
wdyt about adding measurement to the name of property like |
@skabashnyuk we want to stay as close as possible to openshift spec and there the unit of measure is part of the value (e.g. |
@skabashnyuk @l0rd The String used for this property can be anything that OpenShift will accept, as it is passed pretty much directly to OpenShift. I worry that including units could cause more confusion, since e.g. setting the property to Perhaps a better solution is to add documentation to the che.properties file specifying the constraints on these Strings? |
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.
LGTM. I've added a few questions but think it's good to merge as-is.
@@ -294,8 +294,10 @@ che.openshift.liveness.probe.delay=300 | |||
che.openshift.liveness.probe.timeout=1 | |||
che.openshift.workspaces.pvc.name=claim-che-workspace | |||
che.openshift.workspaces.pvc.quantity=10Gi | |||
che.openshift.workspace.cpu.limit=1 | |||
# Override memory limit used for openshift workspaces. String, e.g. 1300Mi | |||
# The amount of memory required for a workspace container to run e.g. 512Mi |
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.
WDYT about leaving the cpu.limit
in place? It does make things longer and less readable, but in terms of a general solution it would be useful to be able to specify this value, even if it doesn't apply to our specific case. It would be handy e.g. if running on minishift with a simple quota in place.
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.
@amisevsk Yes I think it makes sense to have cpu limit and request. Even if we don't need that right now we may need it later. But I would rather add it in second PR.
# Override memory limit used for openshift workspaces. String, e.g. 1300Mi | ||
# The amount of memory required for a workspace container to run e.g. 512Mi | ||
che.openshift.workspace.memory.request=NULL | ||
# The max amount of memory the container can use. |
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.
Since there is some confusion about the format of these properties, maybe we can link to the OpenShift documentation in the description. This does have the problem of having to keep that link up to date though.
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.
I've updated the che.properties pointing to the documentation
@amisevsk We usually don't hesitate to explicitly set measurement unit in name of a property. Example https://github.com/eclipse/che/blob/master/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/codenvy/che.properties#L91-L91 I agree that allowing to set it is quite error prone. |
Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
Adding a new property
che.openshift.workspace.memory.request
. If this property is set it will be used in the spec of the workspace containers (c.f. OpenShift documentation on memory requests).This fixes "Insufficient memory" problem we currently have on Minishift.
Changelog
Adding property to set workspaces memory request on OpenShift