What's the effect of metricType on generated HPA #6830
Unanswered
sirish-bajpai
asked this question in
Q&A / Need Help
Replies: 1 comment
-
Hi @sirish-bajpai , You can reference my config,
please note the metricType is same level as metadata, I put it in metadata before, so it doesn't work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to scale on a prometheus query:
sum(jvm_memory_commited_bytes{jvm_memory_type="heap"})/sum(jvm_memory_limit_bytes{jvm_memory_type="heap"})
Basically if the total heap committed by an app increases above a ratio over total heap available for the app, scaling up should occur.
I was expecting the hpa to scale on this metric as is. But it takes the average value by dividing this scaler with number of pods.
Setting the metricType = "Value" seem to have no effect. HPA insists on averaging with pod count.
I would like to understand what effect setting the metricType has on hpa?
How can I modify the query or the scaledobject config to get the intended effect?
Beta Was this translation helpful? Give feedback.
All reactions