I am in a situation where my app has 3-4 sections, all sections are tied to some user group from keycloak. It is a 1-1 relationship. The memory require for all sections are around 1-2 GB but only one section is around 16GB thus, if I make a minimum memory requirement to be 16 GB then it works but my resources are wasted a lot. If I keep it less then there are situations when this section of the app crashes.
I am looking for an option to set the memory requirement of the app based on some value in the annotations
for e.g.:
container-memory-request: {if(annotations.contains(“ABC”) then “16Gi” else “2Gi”}
I have a feeling that SPeL could be used to achieve this but I could not find any documentation of the same or any examples.
Any help would be highly appreciated.
Thanks,
Ramakant