-
Notifications
You must be signed in to change notification settings - Fork 39
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
Operator 0.5.3 #215
Operator 0.5.3 #215
Conversation
jmesnil
commented
Jan 17, 2022
- PR which aggregates fix: fixed autoscaling with the hpa #210 & Add support for resources on the Stateful Set #212
Signed-off-by: Jeff Mesnil <[email protected]>
* added resources directive required for autoscaling * added selector label for CR required by the HPA the unique name label should suffice as the selector label This fixes wildfly#211
3223aa3
to
b7785a2
Compare
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.
@jmesnil found a minor harmless detail. Besides that, looks good to me
* Update doc * Use same code for statefulset and pvc resources this fixes wildfly#211
b7785a2
to
f498be9
Compare
[[resources]] | ||
## Specify the Resource requirements for the container | ||
|
||
The `resources` spec is defined in the link:../apis.adoc#Resources[Resources API Documentation]. |
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 am getting 404 as this is resolving to
https://github.com/wildfly/wildfly-operator/blob/master/apis.adoc#Resources
Should be
https://github.com/wildfly/wildfly-operator/blob/master/doc/apis.adoc#resources
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.
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.
@@ -44,16 +44,31 @@ It uses a `StatefulSet` with a pod spec that mounts the volume specified by `sto | |||
| `bootableJar` | BootableJar specifies whether the application image is using WildFly S2I Builder/Runtime images or Bootable Jar. If omitted, | |||
it defaults to false (application image is expected to use WildFly S2I Builder/Runtime images) | bool | false | |||
| `standaloneConfigMap` | spec to specify how standalone configuration can be read from a `ConfigMap` | *<<standaloneconfigmapspec>> |false | |||
| `resources`| Resources spec to specify the request or limits of the Stateful Set. If ommited, the namespace defaults are used. | *<<resources>> | false |
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.
Can I ask? From how this is documented here user can think there should be resources.resurces
field. But in example there is just one field resources
.
Shouldn't be here resources
directly of type https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#resourcerequirements-v1-core[corev1.ResourceRequirements
? Analogous as env or envFrom
?
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.
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.
Hi @mchoma,
I understand your concern, the key point here is that the value at the Scheme column is a pointer to another structure (notice it starts with *
, and not a structure itself. So, resources
is like *resources
, which is indeed a https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#resourcerequirements-v1-core[corev1.ResourceRequirements
This specific case falls into these others:
standaloneConfigMap
-> *StandaloneConfigMapSpecstorage
-> *StorageSpec
It could be subtle for the user's thought, but after you run/check an example, you can realize it. Maybe having more quick examples could help with this.
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.
@mchoma sorry, my explanation isn't really a good one; we indeed have resources -> *resources but then you see a field named as resources
, and that can be confusing and make you think you have to use resources.resources
to define it.
We could have resources -> *resources and then two fields like limits and requests or completely replace resources -> *resources by resources -> corev1.ResourceRequirements
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.
or completely replace resources -> *resources by resources -> corev1.ResourceRequirements
Yes that was my understanding what could be done to be consistent with rest.
We could have resources -> *resources and then two fields like limits and requests
TBH that sounds to me it will be less consistent with rest.