Skip to content
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

Add the ability to control cpu and memory resources from top level Wildfly YAML #208

Closed
seeker25 opened this issue Sep 21, 2021 · 3 comments
Labels
Basic Install (I) Features for Phase I of the Operator capability levels
Milestone

Comments

@seeker25
Copy link

seeker25 commented Sep 21, 2021

Currently it defaults to what the namespace defaults are. I believe this is under control of a cluster admin?

$ oc describe limits default-limits
Name: default-limits
Namespace: xxxxx
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio


Container cpu - - 50m 250m -
Container memory - - 256Mi 1Gi -

As a work around I've had to do an OC patch to set the StatefulSet resources:

oc patch statefulset xxx -p '{"spec": {"template": {"spec": {"containers": [{"name": "xxx", "resources": {"limits": {"cpu": "1000m","memory": "1Gi"}}}]}}}}'

I figured the storage is already on there, why not have the CPU and memory as well for each replica?

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/getting_started_with_jboss_eap_for_openshift_container_platform/index#wildflyserverspec_default

Wouldn't it be possible to pass down from WildFlySpec / WildFlyServerSpec to the StatefulSet here?:

Containers: []corev1.Container{{

@danbigthink
Copy link

danbigthink commented Sep 21, 2021

Currently it defaults to what the namespace defaults are. I believe this is under control of a cluster admin?

$ oc describe limits default-limits
Name: default-limits
Namespace: xxxxx
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio

Container cpu - - 50m 250m -
Container memory - - 256Mi 1Gi -

As a work around I've had to do an OC patch to set the StatefulSet resources:

oc patch statefulset xxx -p '{"spec": {"template": {"spec": {"containers": [{"name": "xxx", "resources": {"limits": {"cpu": "1000m","memory": "1Gi"}}}]}}}}'

I figured the storage is already on there, why not have the CPU and memory as well for each replica?

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html-single/getting_started_with_jboss_eap_for_openshift_container_platform/index#wildflyserverspec_default

Wouldn't it be possible to pass down from WildFlySpec / WildFlyServerSpec to the StatefulSet here?:

Containers: []corev1.Container{{

I love this idea and would find it useful so I don't have to do extra work!
A great example of this is in openfaas faas-netes github repo
https://github.com/openfaas/faas-netes#configuration-of-the-controller

@seeker25 seeker25 changed the title No way to control cpu and memory resources from top level Wildfly YAML Add the ability to control cpu and memory resources from top level Wildfly YAML Oct 16, 2021
@jmesnil jmesnil added the Basic Install (I) Features for Phase I of the Operator capability levels label Dec 16, 2021
@jmesnil jmesnil added this to the 0.5.3 milestone Dec 16, 2021
@jmesnil jmesnil linked a pull request Dec 16, 2021 that will close this issue
@BobVanB
Copy link
Contributor

BobVanB commented Jan 4, 2022

Maybe something like:
#212 Add support for resources on the Stateful Set

@jmesnil
Copy link
Member

jmesnil commented Jan 25, 2022

Fixed in #215

@jmesnil jmesnil closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Basic Install (I) Features for Phase I of the Operator capability levels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants