-
Notifications
You must be signed in to change notification settings - Fork 26
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
documentation: quantities and metric relation, case sensitiveness, metric context/selection #101
Comments
Hi there!
They can. They will be correctly interpreted whether you specify a Quantity identifier (m, G, k ...) as can be seen here.
to
If you don't specify anything the value will be just be an int64. The conversion in the code makes it so if you don't specify a quantity and the value will be converted to a quantity and be compared as a millivalue (so 70 becomes 70000m) and compared to the value returned by the metrics server.
Then the autoscaler client used in the Watermark Pod Autoscaler controller is from kubernetes upstream and converts the value into an int64 as a milli, per here. As you can see, all methods in the interface return an int64.
I think we retrieve a float (so I would therefore recommend using
I don't want to misinform you on this one, I don't see upper cases in the officially collected docker metrics, but I might be missing something. I would expect everything to be lowercased but could be wrong (if the above link does not clarify the metrics, I can circle back and confirm internally).
If you don't scope over a specific container with the docker metric or a specific pod with the kubernetes one, you will end up with an average of what the metric represents.
Hard to say without having the full context of your application and infrastructure, what I would say is that docker metrics are direct interfaces of the cgroups whereas the kubernetes ones are interfaced by the CRI which itself interfaces the cgroups. I hope this clarifies your questions! |
Hi there - Circling back on this issue. Did my response help? |
quantities and metric relation
Taken from the docs..
"They are specified as Quantities, so you can use m | "" | k | M | G | T | P | E to easily represent the value you want to use."
The above sentence quotes that highWatermark and lowWatermark values can or must? be extended by quantity.
I assume its dependent on the type of metric.
What type of quantity is "" ?
What about percent values like i think it shall be able to use all kind of metrics which have a defined max and a min value like e.g kubernetes.memory.usage_pct or kubernetes.cpu.usage_pct. Do i need to set only the value 90 or 90% ?
If i don't add a quantity but just the number, will it take a default (which) or will it fail?
case sensitiveness
There are different metrics i can use . eg.
The docker Metrics e.g "Memory" have upper case. Is there generally any case sensitiveness ?
metric context/selection
Taking above two metric sources - system/docker and kubernetes - i could use
similar metrics from both e.g system.mem.used vs kubernetes.memory.usage
If i deploy a resource wpa
will the both metric measurements be scoped to the container level per pod or do they have different scopes and which?
Which of these might be the better choice to control the scale
The text was updated successfully, but these errors were encountered: